diff options
author | Guenter Knauf <lists@gknw.net> | 2014-10-29 00:56:48 +0100 |
---|---|---|
committer | Guenter Knauf <lists@gknw.net> | 2014-10-29 00:59:38 +0100 |
commit | e42e3a4facfca971b5e09e8351312946ccb25e79 (patch) | |
tree | 8199361ebe05c3fb4804d7e52706df7b96ea094d /lib | |
parent | 2e121fda355ecc94e155d27adbd21525aa60fdba (diff) |
Check for ALPN via OpenSSL version number.
This check works also with to non-configure platforms.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vtls/openssl.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index f42ebd896..87f88879c 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -1420,17 +1420,13 @@ static void ssl_tls_trace(int direction, int ssl_ver, int content_type, #ifdef USE_NGHTTP2 +/* Check for OpenSSL 1.0.2 which has ALPN support. */ #undef HAS_ALPN -#if defined(HAVE_SSL_CTX_SET_ALPN_PROTOS) && \ - defined(HAVE_SSL_CTX_SET_ALPN_SELECT_CB) -# define HAS_ALPN 1 -#endif - -#if !defined(HAVE_SSL_CTX_SET_NEXT_PROTO_SELECT_CB) || \ - defined(OPENSSL_NO_NEXTPROTONEG) -# if !defined(HAS_ALPN) -# error http2 builds require OpenSSL with NPN or ALPN support -# endif +#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_NEXTPROTONEG) \ + && !defined(OPENSSL_NO_TLSEXT) +# define HAS_ALPN +#else +# error http2 builds require OpenSSL with NPN or ALPN support #endif |