mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Sample HTTPS Client: Set hostname for SNI extension (by f69m)
Patch from f69m on SourceForge
This commit is contained in:
parent
62f596b7f4
commit
d1976f8ec4
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user