Issue #17134: Add ssl.enum_cert_store() as interface to Windows' cert store.

This commit is contained in:
Christian Heimes 2013-06-09 19:03:31 +02:00
parent 142ec2c014
commit 46bebee25f
7 changed files with 200 additions and 16 deletions

View file

@ -359,6 +359,20 @@ Certificate handling
.. versionadded:: 3.4
.. function:: enum_cert_store(store_name, cert_type='certificate')
Retrieve certificates from Windows' system cert store. *store_name* may be
one of ``CA``, ``ROOT`` or ``MY``. Windows may provide additional cert
stores, too. *cert_type* is either ``certificate`` for X.509 certificates
or ``crl`` for X.509 certificate revocation lists.
The function returns a list of (bytes, encoding_type) tuples. The
encoding_type flag can be interpreted with :const:`X509_ASN_ENCODING` or
:const:`PKCS_7_ASN_ENCODING`.
Availability: Windows.
.. versionadded:: 3.4
Constants
^^^^^^^^^
@ -598,6 +612,15 @@ Constants
.. versionadded:: 3.4
.. data:: X509_ASN_ENCODING
PKCS_7_ASN_ENCODING
Encoding flags for :func:`enum_cert_store`.
Availability: Windows.
.. versionadded:: 3.4
SSL Sockets
-----------