Files
MINGW-packages/mingw-w64-python3/0870-mingw-fix-ssl-dont-use-enum_certificates.patch
2014-10-11 14:46:25 +01:00

22 lines
899 B
Diff

diff -urN a/Lib/ssl.py b/Lib/ssl.py
--- a/Lib/ssl.py 2014-10-11 14:23:27.721614900 +0100
+++ b/Lib/ssl.py 2014-10-11 14:23:30.169754900 +0100
@@ -144,7 +144,7 @@
_PROTOCOL_NAMES[PROTOCOL_TLSv1_1] = "TLSv1.1"
_PROTOCOL_NAMES[PROTOCOL_TLSv1_2] = "TLSv1.2"
-if sys.platform == "win32":
+if sys.platform == "win32" and sys.version.find("GCC") == -1:
from _ssl import enum_certificates, enum_crls
from socket import socket, AF_INET, SOCK_STREAM, create_connection
@@ -387,7 +387,7 @@
def load_default_certs(self, purpose=Purpose.SERVER_AUTH):
if not isinstance(purpose, _ASN1Object):
raise TypeError(purpose)
- if sys.platform == "win32":
+ if sys.platform == "win32" and sys.version.find("GCC") == -1:
for storename in self._windows_cert_stores:
self._load_windows_store_certs(storename, purpose)
else: