From 7bbdaf699dbacc0a3d0966b7817f1c15c8e95bac Mon Sep 17 00:00:00 2001 From: jiangtaoli2016 Date: Thu, 12 Mar 2020 16:35:23 -0700 Subject: [PATCH] Treat SNI mismatch as fatal --- src/core/tsi/ssl_transport_security.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index 02c278dad65..3f4aa96de6f 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -1707,7 +1707,7 @@ static int ssl_server_handshaker_factory_servername_callback(SSL* ssl, } } gpr_log(GPR_ERROR, "No match found for server name: %s.", servername); - return SSL_TLSEXT_ERR_ALERT_WARNING; + return SSL_TLSEXT_ERR_NOACK; } #if TSI_OPENSSL_ALPN_SUPPORT