Skip to content

Commit 512742d

Browse files
bpo-41561: Fix testing with OpenSSL 1.0.2 (GH-25355) (GH-25858)
Signed-off-by: Christian Heimes <[email protected]> (cherry picked from commit 3447750) Co-authored-by: Christian Heimes <[email protected]>
1 parent 64be96a commit 512742d

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
@@ -157,7 +157,10 @@ def is_ubuntu():
157157
def seclevel_workaround(*ctxs):
158158
""""Lower security level to '1' and allow all ciphers for TLS 1.0/1"""
159159
for ctx in ctxs:
160-
if ctx.minimum_version <= ssl.TLSVersion.TLSv1_1:
160+
if (
161+
hasattr(ctx, "minimum_version") and
162+
ctx.minimum_version <= ssl.TLSVersion.TLSv1_1
163+
):
161164
ctx.set_ciphers("@SECLEVEL=1:ALL")
162165
else:
163166
def seclevel_workaround(*ctxs):

0 commit comments

Comments
 (0)