void-packages/srcpkgs/python3/patches/libressl-2.6.patch

48 lines
1.3 KiB
Diff

https://github.com/python/cpython/pull/4930
--- Lib/test/test_ssl.py.orig
+++ Lib/test/test_ssl.py
@@ -29,6 +29,12 @@
PROTOCOLS = sorted(ssl._PROTOCOL_NAMES)
HOST = support.HOST
IS_LIBRESSL = ssl.OPENSSL_VERSION.startswith('LibreSSL')
+if IS_LIBRESSL:
+ LIBRESSL_VERSION = tuple(
+ int(s) for s in ssl.OPENSSL_VERSION.rsplit(' ')[-1].split('.')
+ )
+else:
+ LIBRESSL_VERSION = ()
IS_OPENSSL_1_1 = not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (1, 1, 0)
@@ -3392,6 +3398,8 @@ def test_selected_npn_protocol(self):
chatty=True, connectionchatty=True)
self.assertIs(stats['client_npn_protocol'], None)
+ @unittest.skipIf(IS_LIBRESSL and LIBRESSL_VERSION >= (2, 6, 1),
+ "LibreSSL 2.6.1+ has broken NPN support")
@unittest.skipUnless(ssl.HAS_NPN, "NPN support needed for this test")
def test_npn_protocols(self):
server_protocols = ['http/1.1', 'spdy/2']
--- Tools/ssl/multissltests.py.orig
+++ Tools/ssl/multissltests.py
@@ -47,7 +47,7 @@
OPENSSL_RECENT_VERSIONS = [
"1.0.2",
- "1.0.2m",
+ "1.0.2n",
"1.1.0g",
]
@@ -57,8 +57,8 @@
]
LIBRESSL_RECENT_VERSIONS = [
- "2.5.3",
"2.5.5",
+ "2.6.4",
]
# store files in ../multissl