]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-131736: only apply `security_level` workaround in `test_ssl` for security...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 1 Apr 2025 08:16:34 +0000 (10:16 +0200)
committerGitHub <noreply@github.com>
Tue, 1 Apr 2025 08:16:34 +0000 (08:16 +0000)
gh-131736: only apply `security_level` workaround in `test_ssl` for security levels greater than 1 (GH-131739)
(cherry picked from commit 3b3720f1a26ab34377542b48eb6a6565f78ff892)

Co-authored-by: Will Childs-Klein <willck93@gmail.com>
Lib/test/test_ssl.py

index 75b7e5ca506aa3f1d36ae155a08b396c0af36e76..b13e37d0cd18ee953aefcb899aa576a4775fe019 100644 (file)
@@ -173,7 +173,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: