Skip to content

Commit d63c5a8

Browse files
WillChilds-Kleinmiss-islington
authored andcommitted
pythongh-131736: only apply security_level workaround in test_ssl for security levels greater than 1 (pythonGH-131739)
(cherry picked from commit 3b3720f) Co-authored-by: Will Childs-Klein <willck93@gmail.com>
1 parent 6cdd3a4 commit d63c5a8

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
@@ -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)