Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Lib/test/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -4674,7 +4674,9 @@ def cb_raising(ssl_sock, server_name, initial_context):
sni_name='supermessage')

# Allow for flexible libssl error messages.
regex = "(SSLV3_ALERT_HANDSHAKE_FAILURE|NO_PRIVATE_VALUE)"
regex = ("(TLS_ALERT_HANDSHAKE_FAILURE"
"|SSLV3_ALERT_HANDSHAKE_FAILURE"
"|NO_PRIVATE_VALUE)")
self.assertRegex(cm.exception.reason, regex)
self.assertEqual(catch.unraisable.exc_type, ZeroDivisionError)

Expand Down
14 changes: 8 additions & 6 deletions Modules/_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,18 @@ static void _PySSLFixErrno(void) {

/* Include generated data (error codes) */
/* See Tools/ssl/make_ssl_data.py for notes on adding a new version. */
#if (OPENSSL_VERSION_NUMBER >= 0x30401000L)
#include "_ssl_data_36.h"
#if (OPENSSL_VERSION_NUMBER >= 0x40000000L)
# include "_ssl_data_40.h"
#elif (OPENSSL_VERSION_NUMBER >= 0x30401000L)
# include "_ssl_data_36.h"
#elif (OPENSSL_VERSION_NUMBER >= 0x30100000L)
#include "_ssl_data_340.h"
# include "_ssl_data_340.h"
#elif (OPENSSL_VERSION_NUMBER >= 0x30000000L)
#include "_ssl_data_300.h"
# include "_ssl_data_300.h"
#elif (OPENSSL_VERSION_NUMBER >= 0x10101000L)
#include "_ssl_data_111.h"
# include "_ssl_data_111.h"
#else
#error Unsupported OpenSSL version
# error Unsupported OpenSSL version
#endif

#if (OPENSSL_VERSION_NUMBER >= 0x40000000L)
Expand Down
Loading
Loading