Merge pull request #1173 from nghttp2/asio-client-sni

asio: Support client side SNI
This commit is contained in:
Tatsuhiro Tsujikawa 2018-05-04 10:26:31 +09:00 committed by GitHub
commit ce8c749b77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,10 @@ session_tls_impl::session_tls_impl(
// ssl::context::set_verify_mode(boost::asio::ssl::verify_peer) is // ssl::context::set_verify_mode(boost::asio::ssl::verify_peer) is
// not used, which is what we want. // not used, which is what we want.
socket_.set_verify_callback(boost::asio::ssl::rfc2818_verification(host)); socket_.set_verify_callback(boost::asio::ssl::rfc2818_verification(host));
auto ssl = socket_.native_handle();
if (!util::numeric_host(host.c_str())) {
SSL_set_tlsext_host_name(ssl, host.c_str());
}
} }
session_tls_impl::~session_tls_impl() {} session_tls_impl::~session_tls_impl() {}