Skip to content

Commit 3309113

Browse files
authored
bpo-43799: Also define SSLv3_method() (GH-25481)
Signed-off-by: Christian Heimes <[email protected]>
1 parent 389212c commit 3309113

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

Lib/test/test_ssl.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3245,10 +3245,6 @@ def test_protocol_sslv2(self):
32453245
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv3, False)
32463246
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_TLSv1, False)
32473247
# SSLv23 client with specific SSL options
3248-
if no_sslv2_implies_sslv3_hello():
3249-
# No SSLv2 => client will use an SSLv3 hello on recent OpenSSLs
3250-
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_TLS, False,
3251-
client_options=ssl.OP_NO_SSLv2)
32523248
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_TLS, False,
32533249
client_options=ssl.OP_NO_SSLv3)
32543250
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_TLS, False,
@@ -3309,10 +3305,6 @@ def test_protocol_sslv3(self):
33093305
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_TLS, False,
33103306
client_options=ssl.OP_NO_SSLv3)
33113307
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_TLSv1, False)
3312-
if no_sslv2_implies_sslv3_hello():
3313-
# No SSLv2 => client will use an SSLv3 hello on recent OpenSSLs
3314-
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_TLS,
3315-
False, client_options=ssl.OP_NO_SSLv2)
33163308

33173309
@requires_tls_version('TLSv1')
33183310
def test_protocol_tlsv1(self):

Modules/_ssl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ static void _PySSLFixErrno(void) {
123123
#endif
124124

125125
/* OpenSSL API 1.1.0+ does not include version methods */
126+
#ifndef OPENSSL_NO_SSL3_METHOD
127+
extern const SSL_METHOD *SSLv3_method(void);
128+
#endif
126129
#ifndef OPENSSL_NO_TLS1_METHOD
127130
extern const SSL_METHOD *TLSv1_method(void);
128131
#endif

0 commit comments

Comments
 (0)