summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ssl.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-12-12 11:27:08 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-12-12 11:27:08 (GMT)
commit3f7e064b2b10e623c592bb1e5d98b2fdbc7a2bf3 (patch)
tree3aed738a0bcdde8c98c63de615ca4890015c9aec /Lib/test/test_ssl.py
parent0041142785b347b757dc881247b59850ec7d2f4e (diff)
downloadcpython-3f7e064b2b10e623c592bb1e5d98b2fdbc7a2bf3.zip
cpython-3f7e064b2b10e623c592bb1e5d98b2fdbc7a2bf3.tar.gz
cpython-3f7e064b2b10e623c592bb1e5d98b2fdbc7a2bf3.tar.bz2
Issue #22935: Fix test_ssl when the SSLv3 protocol is not supported
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r--Lib/test/test_ssl.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 2dea0c5..9885eae 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -2142,7 +2142,8 @@ else:
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True, ssl.CERT_OPTIONAL)
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True, ssl.CERT_REQUIRED)
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, False)
- try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv3, False)
+ if hasattr(ssl, 'PROTOCOL_SSLv3'):
+ try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv3, False)
try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_TLSv1, False)
# SSLv23 client with specific SSL options
if no_sslv2_implies_sslv3_hello():