-
-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSL: diagnostic functions to list loaded CA certs #62347
Comments
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@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@cacert.org'),)),
'version': 3}] |
New patch
|
Updated patch with Antoine's review:
|
New changeset 38e759e4c9e6 by Christian Heimes in branch 'default': |
New changeset ae0734493f6b by Christian Heimes in branch 'default': |
It looks like the doc for get_ca_certs wasn't missing, so now it appears twice in the docs. I'm not sure which is the preferred wording, so I'll leave it to Christian to fix it. |
New changeset d88b5469fdd3 by Antoine Pitrou in branch '3.4': New changeset d7352db81b50 by Antoine Pitrou in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: