From c48592fa22a9c9a53ac2314c8e7b925263f190ab Mon Sep 17 00:00:00 2001
From: Alexey Pavlov <alexpux@gmail.com>
Date: Mon, 1 Sep 2025 13:24:11 +0300
Subject: [PATCH 132/N] ssl module: Build with windows cert store support.
 Remove redundant define

---
 Modules/_ssl.c          | 4 ++--
 Modules/clinic/_ssl.c.h | 8 ++++----
 configure.ac            | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index fd8c16b..af140ff 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -5888,7 +5888,7 @@ _ssl_nid2obj_impl(PyObject *module, int nid)
     return result;
 }
 
-#ifdef _MSC_VER
+#ifdef _WIN32
 
 static PyObject*
 certEncodingType(DWORD encodingType)
@@ -6207,7 +6207,7 @@ _ssl_enum_crls_impl(PyObject *module, const char *store_name)
     }
 }
 
-#endif /* _MSC_VER */
+#endif /* _WIN32 */
 
 /* List of functions exported by this module. */
 static PyMethodDef PySSL_methods[] = {
diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h
index 7c1ea6a..e614bb1 100644
--- a/Modules/clinic/_ssl.c.h
+++ b/Modules/clinic/_ssl.c.h
@@ -2703,7 +2703,7 @@ exit:
     return return_value;
 }
 
-#if defined(_MSC_VER)
+#if defined(_WIN32)
 
 PyDoc_STRVAR(_ssl_enum_certificates__doc__,
 "enum_certificates($module, /, store_name)\n"
@@ -2780,9 +2780,9 @@ exit:
     return return_value;
 }
 
-#endif /* defined(_MSC_VER) */
+#endif /* defined(_WIN32) */
 
-#if defined(_MSC_VER)
+#if defined(_WIN32)
 
 PyDoc_STRVAR(_ssl_enum_crls__doc__,
 "enum_crls($module, /, store_name)\n"
@@ -2858,7 +2858,7 @@ exit:
     return return_value;
 }
 
-#endif /* defined(_MSC_VER) */
+#endif /* defined(_WIN32) */
 
 #ifndef _SSL_ENUM_CERTIFICATES_METHODDEF
     #define _SSL_ENUM_CERTIFICATES_METHODDEF
diff --git a/configure.ac b/configure.ac
index 9818d4f..295c442 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8378,7 +8378,7 @@ PY_STDLIB_MOD([_lzma], [], [test "$have_liblzma" = yes],
 
 dnl OpenSSL bindings
 PY_STDLIB_MOD([_ssl], [], [test "$ac_cv_working_openssl_ssl" = yes],
-  [$OPENSSL_INCLUDES], [$OPENSSL_LDFLAGS $OPENSSL_LDFLAGS_RPATH $OPENSSL_LIBS -lws2_32])
+  [$OPENSSL_INCLUDES], [$OPENSSL_LDFLAGS $OPENSSL_LDFLAGS_RPATH $OPENSSL_LIBS -lws2_32 -lcrypt32])
 PY_STDLIB_MOD([_hashlib], [], [test "$ac_cv_working_openssl_hashlib" = yes],
   [$OPENSSL_INCLUDES], [$OPENSSL_LDFLAGS $OPENSSL_LDFLAGS_RPATH $LIBCRYPTO_LIBS])
 
@@ -8398,7 +8398,7 @@ PY_STDLIB_MOD([_testcapi],
 PY_STDLIB_MOD([_testclinic], [test "$TEST_MODULES" = yes])
 PY_STDLIB_MOD([_testclinic_limited], [test "$TEST_MODULES" = yes])
 PY_STDLIB_MOD([_testlimitedcapi], [test "$TEST_MODULES" = yes])
-PY_STDLIB_MOD([_testinternalcapi], [test "$TEST_MODULES" = yes], [], [-DPY3_DLLNAME="\"$DLLLIBRARY\""], [])
+PY_STDLIB_MOD([_testinternalcapi], [test "$TEST_MODULES" = yes])
 PY_STDLIB_MOD([_testbuffer], [test "$TEST_MODULES" = yes])
 PY_STDLIB_MOD([_testimportmultiple], [test "$TEST_MODULES" = yes], [test "$have_dynamic_loading" = yes])
 PY_STDLIB_MOD([_testmultiphase], [test "$TEST_MODULES" = yes], [test "$have_dynamic_loading" = yes])
