diff --git a/src/Tls/TlsOpenSSL.c b/src/Tls/TlsOpenSSL.c index 8020ec1..a956d2a 100644 --- a/src/Tls/TlsOpenSSL.c +++ b/src/Tls/TlsOpenSSL.c @@ -71,14 +71,6 @@ TlsInitClient(int fd, const char *serverName) OpenSSLCookie *cookie; char errorStr[256]; - /* - * TODO: Seems odd that this isn't needed to make the - * connection... we should figure out how to verify the - * certificate matches the server we think we're - * connecting to. - */ - (void) serverName; - cookie = Malloc(sizeof(OpenSSLCookie)); if (!cookie) { @@ -96,6 +88,7 @@ TlsInitClient(int fd, const char *serverName) } cookie->ssl = SSL_new(cookie->ctx); + SSL_set_tlsext_host_name(cookie->ssl, serverName); if (!cookie->ssl) { goto error;