mirror of
https://github.com/python/cpython.git
synced 2026-04-24 12:50:47 +00:00
bpo-35045: Accept TLSv1 default in min max test (GH-11510)
Make ssl tests less strict and also accept TLSv1 as system default. The
changes unbreaks test_min_max_version on Fedora 29.
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 34de2d312b)
Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
c2647f2e45
commit
6ca7183b35
2 changed files with 7 additions and 2 deletions
|
|
@ -1108,8 +1108,11 @@ def test_hostname_checks_common_name(self):
|
|||
"required OpenSSL 1.1.0g")
|
||||
def test_min_max_version(self):
|
||||
ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
|
||||
self.assertEqual(
|
||||
ctx.minimum_version, ssl.TLSVersion.MINIMUM_SUPPORTED
|
||||
# OpenSSL default is MINIMUM_SUPPORTED, however some vendors like
|
||||
# Fedora override the setting to TLS 1.0.
|
||||
self.assertIn(
|
||||
ctx.minimum_version,
|
||||
{ssl.TLSVersion.MINIMUM_SUPPORTED, ssl.TLSVersion.TLSv1}
|
||||
)
|
||||
self.assertEqual(
|
||||
ctx.maximum_version, ssl.TLSVersion.MAXIMUM_SUPPORTED
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
Make ssl tests less strict and also accept TLSv1 as system default. The
|
||||
changes unbreaks test_min_max_version on Fedora 29.
|
||||
Loading…
Add table
Add a link
Reference in a new issue