]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41561: Fix testing with OpenSSL 1.0.2 (GH-25355)
authorChristian Heimes <christian@python.org>
Mon, 12 Apr 2021 10:00:38 +0000 (12:00 +0200)
committerGitHub <noreply@github.com>
Mon, 12 Apr 2021 10:00:38 +0000 (12:00 +0200)
Signed-off-by: Christian Heimes <christian@python.org>
Lib/test/test_ssl.py

index 831f411b12be6fa6604eb46520bdf3e96019bbda..140aecc712738e4f9f808677ba7429774b8e2244 100644 (file)
@@ -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):