Skip to content

Commit 0983e01

Browse files
bpo-41561: Fix testing with OpenSSL 1.0.2 (GH-25355)
Signed-off-by: Christian Heimes <[email protected]> (cherry picked from commit 3447750) Co-authored-by: Christian Heimes <[email protected]>
1 parent 6ec2fb4 commit 0983e01

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_ssl.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ def is_ubuntu():
164164
def seclevel_workaround(*ctxs):
165165
""""Lower security level to '1' and allow all ciphers for TLS 1.0/1"""
166166
for ctx in ctxs:
167-
if ctx.minimum_version <= ssl.TLSVersion.TLSv1_1:
167+
if (
168+
hasattr(ctx, "minimum_version") and
169+
ctx.minimum_version <= ssl.TLSVersion.TLSv1_1
170+
):
168171
ctx.set_ciphers("@SECLEVEL=1:ALL")
169172
else:
170173
def seclevel_workaround(*ctxs):

0 commit comments

Comments
 (0)