summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2014-04-16 16:33:39 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2014-04-16 16:33:39 (GMT)
commitc04306166711bd0a12a4cf3f1b8c68fd0fb7e959 (patch)
treec979ee3d2a9f3ad2caa5a83ce312cdff986eefe0 /Lib
parent7f84d1eb631925b1fd346bbc0fad5af8a62b20f8 (diff)
downloadcpython-c04306166711bd0a12a4cf3f1b8c68fd0fb7e959.zip
cpython-c04306166711bd0a12a4cf3f1b8c68fd0fb7e959.tar.gz
cpython-c04306166711bd0a12a4cf3f1b8c68fd0fb7e959.tar.bz2
Try to fix buildbot failures on old OpenSSLs (< 1.0.0) - followup to issue #21015
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_ssl.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 331d6ba..2b3de1f 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -2593,7 +2593,12 @@ else:
# should be enabled by default on SSL contexts.
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
context.load_cert_chain(CERTFILE)
- context.set_ciphers("ECDH")
+ # Prior to OpenSSL 1.0.0, ECDH ciphers have to be enabled
+ # explicitly using the 'ECCdraft' cipher alias. Otherwise,
+ # our default cipher list should prefer ECDH-based ciphers
+ # automatically.
+ if ssl.OPENSSL_VERSION_INFO < (1, 0, 0):
+ context.set_ciphers("ECCdraft:ECDH")
with ThreadedEchoServer(context=context) as server:
with context.wrap_socket(socket.socket()) as s:
s.connect((HOST, server.port))