Fix build when OpenSSL 1.0.2 is not available

This commit is contained in:
Sunpoet Po-Chuan Hsieh 2015-12-04 17:38:04 +08:00
parent a151a44caf
commit 90b5a5856b
1 changed files with 2 additions and 0 deletions

View File

@ -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;