detect alpn by feature flag not openssl version (closes #23329)
authorBenjamin Peterson <benjamin@python.org>
Sun, 27 Sep 2015 07:09:02 +0000 (00:09 -0700)
committerBenjamin Peterson <benjamin@python.org>
Sun, 27 Sep 2015 07:09:02 +0000 (00:09 -0700)
Misc/NEWS
Modules/_ssl.c

index 249bd5a8cb7a93f7d1c90a080e8c60f9106ad605..1e13f63483a8fabd2d5352a70e4bf2158ffebfde 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -21,6 +21,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #23329: Allow the ssl module to be built with older versions of
+  LibreSSL.
+
 - Prevent overflow in _Unpickler_Read.
 
 - Issue #25047: The XML encoding declaration written by Element Tree now
index ca3549c6570bfbb916e8641e280df6e88643e3ea..e43c5026b77cbde84205973ab1332a14481e1c88 100644 (file)
@@ -109,8 +109,7 @@ struct py_ssl_library_code {
 # define HAVE_SNI 0
 #endif
 
-/* ALPN added in OpenSSL 1.0.2 */
-#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined(OPENSSL_NO_TLSEXT)
+#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
 # define HAVE_ALPN
 #endif