mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +00: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
|
@ -89,6 +89,7 @@ ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY
|
|||
|
||||
import textwrap
|
||||
import re
|
||||
import sys
|
||||
import os
|
||||
import collections
|
||||
|
||||
|
@ -139,6 +140,9 @@ else:
|
|||
_PROTOCOL_NAMES[PROTOCOL_TLSv1_1] = "TLSv1.1"
|
||||
_PROTOCOL_NAMES[PROTOCOL_TLSv1_2] = "TLSv1.2"
|
||||
|
||||
if sys.platform == "win32":
|
||||
from _ssl import enum_cert_store, X509_ASN_ENCODING, PKCS_7_ASN_ENCODING
|
||||
|
||||
from socket import getnameinfo as _getnameinfo
|
||||
from socket import socket, AF_INET, SOCK_STREAM, create_connection
|
||||
import base64 # for DER-to-PEM translation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue