Skip to content

Commit

Permalink
mingw fix ssl dont use enum_certificates
Browse files Browse the repository at this point in the history
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Christoph Reiter <[email protected]>
  • Loading branch information
3 people committed Aug 25, 2023
1 parent 42b7985 commit 675f918
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class _TLSMessageType:
CHANGE_CIPHER_SPEC = 0x0101


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, SOCK_STREAM, create_connection
Expand Down Expand Up @@ -591,7 +591,7 @@ def _load_windows_store_certs(self, storename, purpose):
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)
self.set_default_verify_paths()
Expand Down

0 comments on commit 675f918

Please sign in to comment.