[New-bugs-announce] [issue18147] SSL: diagnostic functions to list loaded CA certs
Christian Heimes
report at bugs.python.org
Thu Jun 6 12:19:29 CEST 2013
New submission from Christian Heimes:
The patch adds two methods to SSLContext which return information about loaded x509 certs, CRL and CAs.
Example:
>>> ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
>>> ctx.load_verify_locations(SVN_PYTHON_ORG_ROOT_CERT)
>>> ctx.cert_store_stats()
{'crl': 0, 'x509': 1}
>>> ctx.get_ca_list()
[{'issuer': ((('organizationName', 'Root CA'),),
(('organizationalUnitName', 'http://www.cacert.org'),),
(('commonName', 'CA Cert Signing Authority'),),
(('emailAddress', 'support at cacert.org'),)),
'notAfter': 'Mar 29 12:29:49 2033 GMT',
'notBefore': 'Mar 30 12:29:49 2003 GMT',
'serialNumber': '00',
'subject': ((('organizationName', 'Root CA'),),
(('organizationalUnitName', 'http://www.cacert.org'),),
(('commonName', 'CA Cert Signing Authority'),),
(('emailAddress', 'support at cacert.org'),)),
'version': 3}]
----------
components: Extension Modules
files: ssl_ca_stats.patch
keywords: patch
messages: 190709
nosy: brett.cannon, christian.heimes, pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: SSL: diagnostic functions to list loaded CA certs
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file30481/ssl_ca_stats.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18147>
_______________________________________
More information about the New-bugs-announce
mailing list