https://github.com/python/cpython/commit/3b3720f1a26ab34377542b48eb6a6565f78ff892
commit: 3b3720f1a26ab34377542b48eb6a6565f78ff892
branch: main
author: Will Childs-Klein <willc...@gmail.com>
committer: picnixz <10796600+picn...@users.noreply.github.com>
date: 2025-04-01T09:58:47+02:00
summary:

gh-131736: only apply `security_level` workaround in `test_ssl` for security 
levels greater than 1 (#131739)

files:
M Lib/test/test_ssl.py

diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index b73028b1a93809..1aff8e22683af0 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -155,7 +155,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:

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to