mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Try to fix buildbot failures on old OpenSSLs (< 1.0.0) - followup to issue #21015
This commit is contained in:
parent
7f84d1eb63
commit
c043061667
1 changed files with 6 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue