# HG changeset patch # User Christian Heimes <christian@python.org> # Date 1618221638 -7200 # Mon Apr 12 12:00:38 2021 +0200 # Node ID 3a06aad28eaaa0bff9cc3040fe8d3e008e1089bb # Parent 03ae4fe8557e29e8e4cd5c8531bacb601af2503c bpo-41561: Fix testing with OpenSSL 1.0.2 (GH-25355) Signed-off-by: Christian Heimes <christian@python.org> diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -168,7 +168,10 @@ def seclevel_workaround(*ctxs): """"Lower security level to '1' and allow all ciphers for TLS 1.0/1""" for ctx in ctxs: - if ctx.minimum_version <= ssl.TLSVersion.TLSv1_1: + if ( + hasattr(ctx, "minimum_version") and + ctx.minimum_version <= ssl.TLSVersion.TLSv1_1 + ): ctx.set_ciphers("@SECLEVEL=1:ALL") else: def seclevel_workaround(*ctxs):