8000 [3.13] gh-131736: only apply `security_level` workaround in `test_ssl… · python/cpython@05e7fa2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 05e7fa2

Browse files
[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 3b3720f) Co-authored-by: Will Childs-Klein <willck93@gmail.com>
1 parent 6ec9c75 commit 05e7fa2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_ssl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ def seclevel_workaround(*ctxs):
183183
for ctx in ctxs:
184184
if (
185185
hasattr(ctx, "minimum_version") and
186-
ctx.minimum_version <= ssl.TLSVersion.TLSv1_1
186+
ctx.minimum_version <= ssl.TLSVersion.TLSv1_1 and
187+
ctx.security_level > 1
187188
):
188189
ctx.set_ciphers("@SECLEVEL=1:ALL")
189190
else:

0 commit comments

Comments
 (0)
0