[3.13] gh-131736: only apply security_level workaround in test_ssl for security levels greater than 1 (GH-131739) (#131967)

gh-131736: only apply `security_level` workaround in `test_ssl` for security levels greater than 1 (GH-131739)
(cherry picked from commit 3b3720f1a2)

Co-authored-by: Will Childs-Klein <willck93@gmail.com>
This commit is contained in:
Miss Islington (bot) 2025-04-01 10:22:28 +02:00 committed by GitHub
parent 6ec9c753c7
commit 05e7fa2c2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -183,7 +183,8 @@ def seclevel_workaround(*ctxs):
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: