spdycat: add support for Server Name Indication (SNI).
Signed-off-by: Piotr Sikora <piotr.sikora@frickle.com>
This commit is contained in:
parent
27dd0b7405
commit
ebfc313a26
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue