added sni

This commit is contained in:
Xiaoxu Guo 2021-02-19 12:59:47 -08:00
parent 88a3cb51af
commit cca58f9b3c
1 changed files with 1 additions and 0 deletions

View File

@ -551,6 +551,7 @@ static void initiate_connection(struct event_base *evbase, SSL_CTX *ssl_ctx,
SSL *ssl;
ssl = create_ssl(ssl_ctx);
SSL_set_tlsext_host_name(ssl, host);
bev = bufferevent_openssl_socket_new(
evbase, -1, ssl, BUFFEREVENT_SSL_CONNECTING,
BEV_OPT_DEFER_CALLBACKS | BEV_OPT_CLOSE_ON_FREE);