Conditional compilation for older OpenSSL.

parent ba4268b4
...@@ -213,11 +213,13 @@ bool ConfigTLSMCC::Set(SSL_CTX* sslctx) { ...@@ -213,11 +213,13 @@ bool ConfigTLSMCC::Set(SSL_CTX* sslctx) {
return false; return false;
}; };
}; };
#if (OPENSSL_VERSION_NUMBER >= 0x10002000L)
if(!protocols_.empty()) { if(!protocols_.empty()) {
if(SSL_CTX_set_alpn_protos(sslctx, (unsigned char const *)protocols_.c_str(), (unsigned int)protocols_.length()) != 0) { if(SSL_CTX_set_alpn_protos(sslctx, (unsigned char const *)protocols_.c_str(), (unsigned int)protocols_.length()) != 0) {
// TODO: add warning message // TODO: add warning message
}; };
}; };
#endif
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment