Skip to content

Commit 3447750

Browse files
authored
bpo-41561: Fix testing with OpenSSL 1.0.2 (GH-25355)
Signed-off-by: Christian Heimes <[email protected]>
1 parent 06e971f commit 3447750

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
@@ -168,7 +168,10 @@ def is_ubuntu():
168168
def seclevel_workaround(*ctxs):
169169
""""Lower security level to '1' and allow all ciphers for TLS 1.0/1"""
170170
for ctx in ctxs:
171-
if ctx.minimum_version <= ssl.TLSVersion.TLSv1_1:
171+
if (
172+
hasattr(ctx, "minimum_version") and
173+
ctx.minimum_version <= ssl.TLSVersion.TLSv1_1
174+
):
172175
ctx.set_ciphers("@SECLEVEL=1:ALL")
173176
else:
174177
def seclevel_workaround(*ctxs):

0 commit comments

Comments
 (0)