churchyard / rpms / python3

Forked from rpms/python3 6 years ago
Clone

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

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