diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-04-12 10:21:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-12 10:21:25 (GMT) |
commit | 04425a922b598d03770619b0c658ee9874113550 (patch) | |
tree | 38e9b20e161019371297957a2f03c861f09904a0 | |
parent | 328d66c0715341f17343281c7b3d3032684e3c0a (diff) | |
download | cpython-04425a922b598d03770619b0c658ee9874113550.zip cpython-04425a922b598d03770619b0c658ee9874113550.tar.gz cpython-04425a922b598d03770619b0c658ee9874113550.tar.bz2 |
bpo-41561: Fix testing with OpenSSL 1.0.2 (GH-25355)
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 3447750073aff229b049e4ccd6217db2811dcfd1)
Co-authored-by: Christian Heimes <christian@python.org>
-rw-r--r-- | Lib/test/test_ssl.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 75ba8a9..e3fe18c1e3 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -160,7 +160,10 @@ if is_ubuntu(): 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): |