asio: ALPN support

This commit is contained in:
Tatsuhiro Tsujikawa
2015-11-07 10:32:08 +09:00
parent ab1f70dcd7
commit b89f1f5869
7 changed files with 113 additions and 12 deletions

View File

@@ -56,6 +56,12 @@ configure_tls_context(boost::system::error_code &ec,
SSL_CTX_set_next_proto_select_cb(ctx, client_select_next_proto_cb, nullptr);
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
auto proto_list = util::get_default_alpn();
SSL_CTX_set_alpn_protos(ctx, proto_list.data(), proto_list.size());
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
return ec;
}