Sample HTTPS Client: Set hostname for SNI extension (by f69m)

Patch from f69m on SourceForge
This commit is contained in:
Nick Mathewson 2013-12-24 14:05:44 -05:00
parent 62f596b7f4
commit d1976f8ec4

View File

@ -318,6 +318,9 @@ main(int argc, char **argv)
die_openssl("SSL_new()");
}
// Set hostname for SNI extension
SSL_set_tlsext_host_name(ssl, host);
if (strcasecmp(scheme, "http") == 0) {
bev = bufferevent_socket_new(base, -1, BEV_OPT_CLOSE_ON_FREE);
} else {