[Python-checkins] cpython (3.4): 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:08 CEST 2014
http://hg.python.org/cpython/rev/d6501421b86b
changeset: 90358:d6501421b86b
branch: 3.4
parent: 90355:a37440dec1b6
user: Antoine Pitrou <solipsis at pitrou.net>
date: Wed Apr 16 18:33:39 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