Skip to content

Commit 9af18bb

Browse files
committed
CDRIVER-2154 SNI not provided when allow_invalid_hostname is set
1 parent 14f4a2d commit 9af18bb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/mongoc/mongoc-stream-tls-openssl.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -560,9 +560,7 @@ mongoc_stream_tls_openssl_handshake (mongoc_stream_t *stream,
560560
/* Added in OpenSSL 0.9.8f, as a build time option */
561561
#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
562562
/* Set the SNI hostname we are expecting certificate for */
563-
if (!tls->ssl_opts.allow_invalid_hostname) {
564-
SSL_set_tlsext_host_name (ssl, host);
565-
}
563+
SSL_set_tlsext_host_name (ssl, host);
566564
#endif
567565

568566
if (BIO_do_handshake (openssl->bio) == 1) {

0 commit comments

Comments
 (0)