Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80668
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | John Nagle <nagle@animats.com> |
| Newsgroups | comp.lang.python |
| Subject | SSLsocket.getpeercert - request to return ALL the fields of the certificate. |
| Date | Wed, 12 Nov 2014 20:39:50 -0800 |
| Organization | A noiseless patient Spider |
| Lines | 42 |
| Message-ID | <54643616.3090402@animats.com> (permalink) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 7bit |
| Injection-Info | mx02.eternal-september.org; posting-host="5be4d335bdf33e68a37bb2b289ec1338"; logging-data="31588"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/HGfgxGP8Kt5q4gztwf1XO" |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
| Cancel-Lock | sha1:TlVTJHxEestP7emNSBKqshkzFmA= |
| Xref | csiph.com comp.lang.python:80668 |
Show key headers only | View raw
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.
John Nagle
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll 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