There was an error while loading. Please reload this page.
1 parent e18ebd9 commit 70f2ca7Copy full SHA for 70f2ca7
7 files changed
Misc/NEWS.d/next/Library/2021-04-09-12-08-01.bpo-43788.YsvInM.rst
@@ -0,0 +1,4 @@
1
+The header files for :mod:`ssl` error codes are now OpenSSL
2
+version-specific. Exceptions will now show correct reason and library
3
+codes. The ``make_ssl_data.py`` script has been rewritten to use OpenSSL's
4
+text file with error codes.
Modules/_ssl.c
@@ -137,7 +137,13 @@ static void _PySSLFixErrno(void) {
137
#endif
138
139
/* Include generated data (error codes) */
140
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
141
+#include "_ssl_data_300.h"
142
+#elif (OPENSSL_VERSION_NUMBER >= 0x10101000L) && !defined(LIBRESSL_VERSION_NUMBER)
143
+#include "_ssl_data_111.h"
144
+#else
145
#include "_ssl_data.h"
146
+#endif
147
148
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
149
# define OPENSSL_VERSION_1_1 1
0 commit comments