summaryrefslogtreecommitdiffstats
path: root/Modules/_ssl.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2021-04-09 16:34:39 (GMT)
committerGitHub <noreply@github.com>2021-04-09 16:34:39 (GMT)
commit299ae9c7a2a169d54921815b9bb41a8f9277a3aa (patch)
tree4e6e7b21b1fccbd1358c2abeb21c11b00e516650 /Modules/_ssl.c
parent54d89a33e0d1b854fd5a72889d6554aeeb4170f0 (diff)
downloadcpython-299ae9c7a2a169d54921815b9bb41a8f9277a3aa.zip
cpython-299ae9c7a2a169d54921815b9bb41a8f9277a3aa.tar.gz
cpython-299ae9c7a2a169d54921815b9bb41a8f9277a3aa.tar.bz2
[3.9] bpo-43788: Generate version specific _ssl_data.h (GH-25300) (GH-25310)
(cherry picked from commit 150af7543214e1541fa582374502ac1cd70e8eb4) Co-authored-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r--Modules/_ssl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 13eecbe5..4ff948e 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -135,7 +135,13 @@ static void _PySSLFixErrno(void) {
#endif
/* Include generated data (error codes) */
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+#include "_ssl_data_300.h"
+#elif (OPENSSL_VERSION_NUMBER >= 0x10101000L) && !defined(LIBRESSL_VERSION_NUMBER)
+#include "_ssl_data_111.h"
+#else
#include "_ssl_data.h"
+#endif
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
# define OPENSSL_VERSION_1_1 1