Skip to content

Commit 04425a9

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 328d66c commit 04425a9

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
@@ -160,7 +160,10 @@ def is_ubuntu():
160160
def seclevel_workaround(*ctxs):
161161
""""Lower security level to '1' and allow all ciphers for TLS 1.0/1"""
162162
for ctx in ctxs:
163-
if ctx.minimum_version <= ssl.TLSVersion.TLSv1_1:
163+
if (
164+
hasattr(ctx, "minimum_version") and
165+
ctx.minimum_version <= ssl.TLSVersion.TLSv1_1
166+
):
164167
ctx.set_ciphers("@SECLEVEL=1:ALL")
165168
else:
166169
def seclevel_workaround(*ctxs):

0 commit comments

Comments
 (0)