Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5a8f03f

Browse files
committed
- Issue #13218: Fix test_ssl failures on Debian/Ubuntu.
2 parents 305bb66 + 46ae0ef commit 5a8f03f

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Lib/test/test_ssl.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,8 @@ def test_protocol_sslv3(self):
13151315
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, True, ssl.CERT_REQUIRED)
13161316
if hasattr(ssl, 'PROTOCOL_SSLv2'):
13171317
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv2, False)
1318-
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv23, False)
1318+
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv23, False,
1319+
client_options=ssl.OP_NO_SSLv3)
13191320
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_TLSv1, False)
13201321
if no_sslv2_implies_sslv3_hello():
13211322
# No SSLv2 => client will use an SSLv3 hello on recent OpenSSLs
@@ -1333,7 +1334,8 @@ def test_protocol_tlsv1(self):
13331334
if hasattr(ssl, 'PROTOCOL_SSLv2'):
13341335
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv2, False)
13351336
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv3, False)
1336-
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv23, False)
1337+
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv23, False,
1338+
client_options=ssl.OP_NO_TLSv1)
13371339

13381340
def test_starttls(self):
13391341
"""Switching from clear text to encrypted and back again."""

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ Library
171171
Tests
172172
-----
173173

174+
- Issue #13218: Fix test_ssl failures on Debian/Ubuntu.
175+
174176
- Issue #12821: Fix test_fcntl failures on OpenBSD 5.
175177

176178
- Re-enable lib2to3's test_parser.py tests, though with an expected failure

0 commit comments

Comments
 (0)