summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortorsava <torsava@redhat.com>2019-12-02 16:15:42 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-12-02 16:15:42 (GMT)
commit34864d1cffdbfc620f8517dab9a68ae9a37b8c53 (patch)
tree80a9e459339bf1c96dff0f74bb9e381609fe2708
parent2fe4c48917c2d1b40cf063c6ed22ae2e71f4cb62 (diff)
downloadcpython-34864d1cffdbfc620f8517dab9a68ae9a37b8c53.zip
cpython-34864d1cffdbfc620f8517dab9a68ae9a37b8c53.tar.gz
cpython-34864d1cffdbfc620f8517dab9a68ae9a37b8c53.tar.bz2
bpo-38815: Accept TLSv3 default in min max test (GH-NNNN) (GH-17437)
Make ssl tests less strict and also accept TLSv3 as the default maximum version. This change unbreaks test_min_max_version on Fedora 32. https://bugs.python.org/issue38815
-rw-r--r--Lib/test/test_ssl.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 3cd6e92..258816d 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -1203,12 +1203,18 @@ class ContextTests(unittest.TestCase):
# RHEL 8 uses TLS 1.2 by default
ssl.TLSVersion.TLSv1_2
}
+ maximum_range = {
+ # stock OpenSSL
+ ssl.TLSVersion.MAXIMUM_SUPPORTED,
+ # Fedora 32 uses TLS 1.3 by default
+ ssl.TLSVersion.TLSv1_3
+ }
self.assertIn(
ctx.minimum_version, minimum_range
)
- self.assertEqual(
- ctx.maximum_version, ssl.TLSVersion.MAXIMUM_SUPPORTED
+ self.assertIn(
+ ctx.maximum_version, maximum_range
)
ctx.minimum_version = ssl.TLSVersion.TLSv1_1