mirror of
https://github.com/python/cpython
synced 2026-09-29 10:35:30 +03:00
Issue #17134: Add ssl.enum_cert_store() as interface to Windows' cert store.
This commit is contained in:
parent
142ec2c014
commit
46bebee25f
7 changed files with 200 additions and 16 deletions
|
|
@ -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
|
||||
-----------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue