Commit ebfc313a authored by Piotr Sikora's avatar Piotr Sikora

spdycat: add support for Server Name Indication (SNI).

Signed-off-by: default avatarPiotr Sikora <piotr.sikora@frickle.com>
parent 27dd0b74
...@@ -482,6 +482,10 @@ int communicate(const std::string& host, uint16_t port, ...@@ -482,6 +482,10 @@ int communicate(const std::string& host, uint16_t port,
std::cerr << ERR_error_string(ERR_get_error(), 0) << std::endl; std::cerr << ERR_error_string(ERR_get_error(), 0) << std::endl;
return -1; return -1;
} }
if (!SSL_set_tlsext_host_name(ssl, host.c_str())) {
std::cerr << ERR_error_string(ERR_get_error(), 0) << std::endl;
return -1;
}
if(ssl_handshake(ssl, fd) == -1) { if(ssl_handshake(ssl, fd) == -1) {
return -1; return -1;
} }
......
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