Skip to content

Commit 3b3720f

Browse files
gh-131736: only apply security_level workaround in test_ssl for security levels greater than 1 (#131739)
1 parent 23a658b commit 3b3720f

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
@@ -155,7 +155,8 @@ def seclevel_workaround(*ctxs):
155155
for ctx in ctxs:
156156
if (
157157
hasattr(ctx, "minimum_version") and
158-
ctx.minimum_version <= ssl.TLSVersion.TLSv1_1
158+
ctx.minimum_version <= ssl.TLSVersion.TLSv1_1 and
159+
ctx.security_level > 1
159160
):
160161
ctx.set_ciphers("@SECLEVEL=1:ALL")
161162
else:

0 commit comments

Comments
 (0)