]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-131736: only apply `security_level` workaround in `test_ssl` for security levels... 131559/head
authorWill Childs-Klein <willck93@gmail.com>
Tue, 1 Apr 2025 07:58:47 +0000 (03:58 -0400)
committerGitHub <noreply@github.com>
Tue, 1 Apr 2025 07:58:47 +0000 (09:58 +0200)
Lib/test/test_ssl.py

index b73028b1a93809b34bea9f48438a08b816d98e4e..1aff8e22683af09b1eb0bb42f4cb7d8c95ae9d63 100644 (file)
@@ -155,7 +155,8 @@ if is_ubuntu():
         for ctx in ctxs:
             if (
                 hasattr(ctx, "minimum_version") and
-                ctx.minimum_version <= ssl.TLSVersion.TLSv1_1
+                ctx.minimum_version <= ssl.TLSVersion.TLSv1_1 and
+                ctx.security_level > 1
             ):
                 ctx.set_ciphers("@SECLEVEL=1:ALL")
 else: