summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_ssl.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 75ba8a9..e3fe18c1e3 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -160,7 +160,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):