Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80669

Re: SSLsocket.getpeercert - request to return ALL the fields of the certificate.

Return-Path <ethan@stoneleaf.us>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.008
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'remaining': 0.07; 'returned.': 0.07; 'revision': 0.07; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'subject:fields': 0.09; '~ethan~': 0.09; 'python': 0.11; '00:00:00': 0.16; '23:59:59': 0.16; 'subject: \n ': 0.16; 'wrote:': 0.18; "skip:' 30": 0.19; 'subject:request': 0.19; 'thanks.': 0.20; 'header:User-Agent:1': 0.23; "aren't": 0.24; 'ssl': 0.24; 'skip:" 20': 0.27; 'header:In- Reply-To:1': 0.27; 'url:bugs': 0.29; 'skip:( 20': 0.30; "skip:' 10": 0.31; '3.2': 0.31; 'class': 0.32; 'url:python': 0.33; 'subject:the': 0.34; 'america': 0.35; 'but': 0.35; 'returning': 0.36; 'url:org': 0.36; 'to:addr:python-list': 0.38; 'issue': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'extended': 0.61; 'john': 0.61; 'received:173': 0.61; 'happen': 0.63; 'more': 0.64; 'now:': 0.74; '2015': 0.84; '3.4': 0.84; 'distinguish': 0.84; 'subject:skip:S 20': 0.91
Date Wed, 12 Nov 2014 20:52:19 -0800
From Ethan Furman <ethan@stoneleaf.us>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1
MIME-Version 1.0
To python-list@python.org
Subject Re: SSLsocket.getpeercert - request to return ALL the fields of the certificate.
References <54643616.3090402@animats.com>
In-Reply-To <54643616.3090402@animats.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.15764.1415854344.18130.python-list@python.org> (permalink)
Lines 46
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1415854344 news.xs4all.nl 2880 [2001:888:2000:d::a6]:38361
X-Complaints-To abuse@xs4all.nl
Path csiph.com!usenet.pasdenom.info!bete-des-vosges.org!feed.ac-versailles.fr!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Xref csiph.com comp.lang.python:80669

Show key headers only | View raw


On 11/12/2014 08:39 PM, John Nagle wrote:
>    In each revision of "getpeercert", a few more fields are returned.
> Python 3.2 added "issuer" and "notBefore".  Python 3.4 added
> "crlDistributionPoints", "caIssuers", and OCSP URLS. But some fields
> still aren't returned.  I happen to need CertificatePolicies, which
> is how you distinguish DV, OV, and EV certs.
>
>     Here's what you get now:
>
> {'OCSP': ('http://EVSecure-ocsp.verisign.com',),
>   'caIssuers': ('http://EVSecure-aia.verisign.com/EVSecure2006.cer',),
>   'crlDistributionPoints':
> ('http://EVSecure-crl.verisign.com/EVSecure2006.crl',),
>   'issuer': ((('countryName', 'US'),),
>              (('organizationName', 'VeriSign, Inc.'),),
>              (('organizationalUnitName', 'VeriSign Trust Network'),),
>              (('organizationalUnitName',
>                'Terms of use at https://www.verisign.com/rpa (c)06'),),
>              (('commonName', 'VeriSign Class 3 Extended Validation SSL
> CA'),)),
>   'notAfter': 'Mar 22 23:59:59 2015 GMT',
>   'notBefore': 'Feb 20 00:00:00 2014 GMT',
>   'serialNumber': '69A7BC85C106DDE1CF4FA47D5ED813DC',
>   'subject': ((('1.3.6.1.4.1.311.60.2.1.3', 'US'),),
>               (('1.3.6.1.4.1.311.60.2.1.2', 'Delaware'),),
>               (('businessCategory', 'Private Organization'),),
>               (('serialNumber', '2927442'),),
>               (('countryName', 'US'),),
>               (('postalCode', '60603'),),
>               (('stateOrProvinceName', 'Illinois'),),
>               (('localityName', 'Chicago'),),
>               (('streetAddress', '135 S La Salle St'),),
>               (('organizationName', 'Bank of America Corporation'),),
>               (('organizationalUnitName', 'Network Infrastructure'),),
>               (('commonName', 'www.bankofamerica.com'),)),
>   'subjectAltName': (('DNS', 'mobile.bankofamerica.com'),
>                      ('DNS', 'www.bankofamerica.com')),
>   'version': 3}
>
>     How about just returning ALL the remaining fields and finishing
> the job?  Thanks.

This would be much better on the issue tracker:  https://bugs.python.org

--
~Ethan~

Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

SSLsocket.getpeercert - request to return ALL the fields of the certificate. John Nagle <nagle@animats.com> - 2014-11-12 20:39 -0800
  Re: SSLsocket.getpeercert - request to return ALL the fields of the certificate. Ethan Furman <ethan@stoneleaf.us> - 2014-11-12 20:52 -0800

csiph-web