diff --git a/src/ssl.c b/src/ssl.c index b414857..3640022 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -99,7 +99,7 @@ int uwsc_ssl_init(struct uwsc_ssl_ctx **ctx, int sock, char *host) c->net.fd = sock; #else -#if UHTTPD_HAVE_WOLFSSL +#if UWSC_HAVE_WOLFSSL wolfSSL_Init(); c->ctx = SSL_CTX_new(TLSv1_2_client_method()); @@ -113,7 +113,9 @@ int uwsc_ssl_init(struct uwsc_ssl_ctx **ctx, int sock, char *host) #endif SSL_CTX_set_verify(c->ctx, SSL_VERIFY_NONE, NULL); c->ssl = SSL_new(c->ctx); +#if UWSC_HAVE_OPENSSL SSL_set_tlsext_host_name(c->ssl, host); +#endif SSL_set_fd(c->ssl, sock); #endif