Browse Source

bpo-41561: Fix testing with OpenSSL 1.0.2 (GH-25355)

Signed-off-by: Christian Heimes <christian@python.org>
pull/25361/head
Christian Heimes 5 years ago
committed by GitHub
parent
commit
3447750073
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      Lib/test/test_ssl.py

5
Lib/test/test_ssl.py

@ -168,7 +168,10 @@ if is_ubuntu():
def seclevel_workaround(*ctxs):
""""Lower security level to '1' and allow all ciphers for TLS 1.0/1"""
for ctx in ctxs:
if ctx.minimum_version <= ssl.TLSVersion.TLSv1_1:
if (
hasattr(ctx, "minimum_version") and
ctx.minimum_version <= ssl.TLSVersion.TLSv1_1
):
ctx.set_ciphers("@SECLEVEL=1:ALL")
else:
def seclevel_workaround(*ctxs):

Loading…
Cancel
Save