churchyard / rpms / python3

Forked from rpms/python3 6 years ago
Clone

Blame 00270-fix-ssl-alpn-hook-test.patch

b5403ba
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
b5403ba
index d203cdd..c128dae 100644
b5403ba
--- a/Lib/test/test_ssl.py
b5403ba
+++ b/Lib/test/test_ssl.py
b5403ba
@@ -3256,8 +3256,9 @@ if _have_threads:
b5403ba
                 except ssl.SSLError as e:
b5403ba
                     stats = e
b5403ba
 
b5403ba
-                if expected is None and IS_OPENSSL_1_1:
b5403ba
-                    # OpenSSL 1.1.0 raises handshake error
b5403ba
+                if (expected is None and IS_OPENSSL_1_1
b5403ba
+                        and ssl.OPENSSL_VERSION_INFO < (1, 1, 0, 6)):
b5403ba
+                    # OpenSSL 1.1.0 to 1.1.0e raises handshake error
b5403ba
                     self.assertIsInstance(stats, ssl.SSLError)
b5403ba
                 else:
b5403ba
                     msg = "failed trying %s (s) and %s (c).\n" \