MINGW-packages/mingw-w64-python3.13/0031-mingw-fix-ssl-dont-use-enum_certificates.patch
Christoph Reiter 04c9ed3700 python3.13: Add 3.13.7
* add libb2 as dep
* remove "-Wl,--large-address-aware", default now via makepkg
* remove 2to3 logic, no longer in Python
2025-09-08 22:02:30 +02:00

37 lines
1.3 KiB
Diff

From 8ed212e62fde9b98cef207131e4a065f839a2a67 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Thu, 17 Jun 2021 18:52:03 +0530
Subject: [PATCH 031/N] mingw fix ssl dont use enum_certificates
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
---
Lib/ssl.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/ssl.py b/Lib/ssl.py
index c8703b0..67119b2 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -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
@@ -528,7 +528,7 @@ class SSLContext(_SSLContext):
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()