Skip to content

Commit 756676f

Browse files
[3.12] gh-131736: only apply security_level workaround in test_ssl for security levels greater than 1 (GH-131739) (#131966)
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 <[email protected]>
1 parent 6cdd3a4 commit 756676f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_ssl.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ def seclevel_workaround(*ctxs):
173173
for ctx in ctxs:
174174
if (
175175
hasattr(ctx, "minimum_version") and
176-
ctx.minimum_version <= ssl.TLSVersion.TLSv1_1
176+
ctx.minimum_version <= ssl.TLSVersion.TLSv1_1 and
177+
ctx.security_level > 1
177178
):
178179
ctx.set_ciphers("@SECLEVEL=1:ALL")
179180
else:

0 commit comments

Comments
 (0)