diff --git a/Release/src/http/client/http_client_asio.cpp b/Release/src/http/client/http_client_asio.cpp index bff2ff4..92f59c8 100644 --- a/Release/src/http/client/http_client_asio.cpp +++ b/Release/src/http/client/http_client_asio.cpp @@ -137,7 +137,8 @@ public: void async_handshake(boost::asio::ssl::stream_base::handshake_type type, const http_client_config &config, const HandshakeHandler &handshake_handler, - const CertificateHandler &cert_handler) + const CertificateHandler &cert_handler, + const utility::string_t &server_name) { std::lock_guard lock(m_socket_lock); assert(is_ssl()); @@ -152,6 +153,8 @@ public: { m_ssl_stream->set_verify_mode(boost::asio::ssl::context::verify_none); } + // Support for Server Name Indication (SNI) + SSL_set_tlsext_host_name(m_ssl_stream->native_handle(), const_cast(server_name.data())); m_ssl_stream->async_handshake(type, handshake_handler); } @@ -573,7 +576,8 @@ private: return this_request->handle_cert_verification(preverified, verify_context); } return false; - }); + }, + m_http_client->base_uri().host()); } else {