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

@ -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