[Python-checkins] cpython (3.4): Issue #22935: Fix test_ssl when the SSLv3 protocol is not supported

victor.stinner python-checkins at python.org
Fri Dec 12 12:27:43 CET 2014


https://hg.python.org/cpython/rev/f0297263a1e8
changeset:   93847:f0297263a1e8
branch:      3.4
parent:      93844:773e55c95703
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Fri Dec 12 12:27:08 2014 +0100
summary:
  Issue #22935: Fix test_ssl when the SSLv3 protocol is not supported

files:
  Lib/test/test_ssl.py |  3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -2142,7 +2142,8 @@
             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():

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list