81 lines
2.3 KiB
Diff
81 lines
2.3 KiB
Diff
From 0798476d66127c0f40fae537226f4d5542951b5c Mon Sep 17 00:00:00 2001
|
|
From: Naveen M K <naveen521kk@gmail.com>
|
|
Date: Tue, 20 Jun 2023 20:35:27 +0530
|
|
Subject: [PATCH 060/N] ssl module: add MINGW support
|
|
|
|
---
|
|
Modules/_ssl.c | 4 ++--
|
|
Modules/clinic/_ssl.c.h | 8 ++++----
|
|
configure.ac | 2 +-
|
|
3 files changed, 7 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
|
|
index 64b6af4..a7489b5 100644
|
|
--- a/Modules/_ssl.c
|
|
+++ b/Modules/_ssl.c
|
|
@@ -5889,7 +5889,7 @@ _ssl_nid2obj_impl(PyObject *module, int nid)
|
|
return result;
|
|
}
|
|
|
|
-#ifdef _MSC_VER
|
|
+#ifdef _WIN32
|
|
|
|
static PyObject*
|
|
certEncodingType(DWORD encodingType)
|
|
@@ -6208,7 +6208,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 628bd87..875b7ec 100644
|
|
--- a/Modules/clinic/_ssl.c.h
|
|
+++ b/Modules/clinic/_ssl.c.h
|
|
@@ -2706,7 +2706,7 @@ exit:
|
|
return return_value;
|
|
}
|
|
|
|
-#if defined(_MSC_VER)
|
|
+#if defined(_WIN32)
|
|
|
|
PyDoc_STRVAR(_ssl_enum_certificates__doc__,
|
|
"enum_certificates($module, /, store_name)\n"
|
|
@@ -2783,9 +2783,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"
|
|
@@ -2861,7 +2861,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 f26754a..416b0fe 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -8308,7 +8308,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])
|
|
+ [$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])
|
|
|