[Python-checkins] cpython (merge 3.4 -> default): Try to fix buildbot failures on old OpenSSLs (< 1.0.0) - followup to issue
antoine.pitrou
python-checkins at python.org
Wed Apr 16 18:34:09 CEST 2014
http://hg.python.org/cpython/rev/1305410bff2d
changeset: 90359:1305410bff2d
parent: 90357:3417a95df7e2
parent: 90358:d6501421b86b
user: Antoine Pitrou <solipsis at pitrou.net>
date: Wed Apr 16 18:34:01 2014 +0200
summary:
Try to fix buildbot failures on old OpenSSLs (< 1.0.0) - followup to issue #21015
files:
Lib/test/test_ssl.py | 7 ++++++-
1 files changed, 6 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
@@ -2593,7 +2593,12 @@
# 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))
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list