From 41891d381692ed1dca5295244b5a8d74f3e8e28f Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 22 Aug 2017 09:07:54 +0200 Subject: [PATCH] Fixes #152: Added client support for Server Name Indication --- client_https.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client_https.hpp b/client_https.hpp index 785ad59..444332d 100644 --- a/client_https.hpp +++ b/client_https.hpp @@ -117,6 +117,8 @@ namespace SimpleWeb { } void handshake(const std::shared_ptr &session) { + SSL_set_tlsext_host_name(session->connection->socket->native_handle(), this->host.c_str()); + session->connection->set_timeout(this->config.timeout_connect); session->connection->socket->async_handshake(asio::ssl::stream_base::client, [this, session](const error_code &ec) { session->connection->cancel_timeout();