Skip to content

Commit

Permalink
bpo-43788: Generate version specific _ssl_data.h (pythonGH-25300)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Heimes <[email protected]>

Automerge-Triggered-By: GH:tiran
  • Loading branch information
tiran authored Apr 9, 2021
1 parent 5151d64 commit 150af75
Show file tree
Hide file tree
Showing 7 changed files with 15,092 additions and 82 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The header files for :mod:`ssl` error codes are now OpenSSL
version-specific. Exceptions will now show correct reason and library
codes. The ``make_ssl_data.py`` script has been rewritten to use OpenSSL's
text file with error codes.
6 changes: 6 additions & 0 deletions Modules/_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 150af75

Please sign in to comment.