There was an error while loading. Please reload this page.
1 parent 5151d64 commit 150af75Copy full SHA for 150af75
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
@@ -135,7 +135,13 @@ static void _PySSLFixErrno(void) {
135
#endif
136
137
/* Include generated data (error codes) */
138
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
139
+#include "_ssl_data_300.h"
140
+#elif (OPENSSL_VERSION_NUMBER >= 0x10101000L) && !defined(LIBRESSL_VERSION_NUMBER)
141
+#include "_ssl_data_111.h"
142
+#else
143
#include "_ssl_data.h"
144
+#endif
145
146
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
147
# define OPENSSL_VERSION_1_1 1
0 commit comments