Skip to content

Commit 675f918

Browse files
mingwandroidAlexpuxlazka
committed
mingw fix ssl dont use enum_certificates
Co-authored-by: Алексей <[email protected]> Co-authored-by: Christoph Reiter <[email protected]>
1 parent 42b7985 commit 675f918

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/ssl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ class _TLSMessageType:
254254
CHANGE_CIPHER_SPEC = 0x0101
255255

256256

257-
if sys.platform == "win32":
257+
if sys.platform == "win32" and sys.version.find("GCC") == -1:
258258
from _ssl import enum_certificates, enum_crls
259259

260260
from socket import socket, SOCK_STREAM, create_connection
@@ -591,7 +591,7 @@ def _load_windows_store_certs(self, storename, purpose):
591591
def load_default_certs(self, purpose=Purpose.SERVER_AUTH):
592592
if not isinstance(purpose, _ASN1Object):
593593
raise TypeError(purpose)
594-
if sys.platform == "win32":
594+
if sys.platform == "win32" and sys.version.find("GCC") == -1:
595595
for storename in self._windows_cert_stores:
596596
self._load_windows_store_certs(storename, purpose)
597597
self.set_default_verify_paths()

0 commit comments

Comments
 (0)