[Python-checkins] (no subject)

Stéphane Wirtel webhook-mailer at python.org
Wed Sep 11 13:59:16 EDT 2019


To: python-checkins at python.org
Subject: bpo-34001: Fix test_ssl with LibreSSL (GH-13783) (#15997)
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
https://github.com/python/cpython/commit/d6ac67f48f5079efc3fa4be3316a9578edb5=
6e0d
commit: d6ac67f48f5079efc3fa4be3316a9578edb56e0d
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.co=
m>
committer: St=C3=A9phane Wirtel <stephane at wirtel.be>
date: 2019年09月11日T19:59:13+02:00
summary:
bpo-34001: Fix test_ssl with LibreSSL (GH-13783) (#15997)
(cherry picked from commit c9bc49c5f6e26a7c958307c2ac338951a7534d9a)
Co-authored-by: Christian Heimes <christian at python.org>
files:
A Misc/NEWS.d/next/Tests/2019-06-03-20-47-10.bpo-34001.KvYx9z.rst
M Lib/test/test_ssl.py
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 48c4fecabd14..a32b0bcc7e22 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -1106,6 +1106,7 @@ def test_hostname_checks_common_name(self):
=20
 @unittest.skipUnless(hasattr(ssl.SSLContext, 'minimum_version'),
 "required OpenSSL 1.1.0g")
+ @unittest.skipIf(IS_LIBRESSL, "see bpo-34001")
 def test_min_max_version(self):
 ctx =3D ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
 # OpenSSL default is MINIMUM_SUPPORTED, however some vendors like
@@ -3726,8 +3727,8 @@ def test_min_max_version(self):
 self.assertEqual(s.version(), 'TLSv1.1')
=20
 # client 1.0, server 1.2 (mismatch)
- server_context.minimum_version =3D ssl.TLSVersion.TLSv1_2
 server_context.maximum_version =3D ssl.TLSVersion.TLSv1_2
+ server_context.minimum_version =3D ssl.TLSVersion.TLSv1_2
 client_context.maximum_version =3D ssl.TLSVersion.TLSv1
 client_context.maximum_version =3D ssl.TLSVersion.TLSv1
 with ThreadedEchoServer(context=3Dserver_context) as server:
diff --git a/Misc/NEWS.d/next/Tests/2019-06-03-20-47-10.bpo-34001.KvYx9z.rst =
b/Misc/NEWS.d/next/Tests/2019-06-03-20-47-10.bpo-34001.KvYx9z.rst
new file mode 100644
index 000000000000..35c65a8fbf0f
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2019-06-03-20-47-10.bpo-34001.KvYx9z.rst
@@ -0,0 +1,2 @@
+Make test_ssl pass with LibreSSL. LibreSSL handles minimum and maximum TLS
+version differently than OpenSSL.


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /