From 90b5a5856b84216e6f6d8ae88ee0db5e012e61bb Mon Sep 17 00:00:00 2001 From: Sunpoet Po-Chuan Hsieh Date: Fri, 4 Dec 2015 17:38:04 +0800 Subject: [PATCH] Fix build when OpenSSL 1.0.2 is not available --- src/asio_common.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/asio_common.cc b/src/asio_common.cc index bbcb7e6a..c8d148fa 100644 --- a/src/asio_common.cc +++ b/src/asio_common.cc @@ -177,9 +177,11 @@ bool tls_h2_negotiated(ssl_socket &socket) { unsigned int next_proto_len = 0; SSL_get0_next_proto_negotiated(ssl, &next_proto, &next_proto_len); +#if OPENSSL_VERSION_NUMBER >= 0x10002000L if (next_proto == nullptr) { SSL_get0_alpn_selected(ssl, &next_proto, &next_proto_len); } +#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L if (next_proto == nullptr) { return false;