Skip to content

Commit

Permalink
tls/sni: skip SNI check or server_name absent
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilianfridrich committed Jul 30, 2024
1 parent 80baf46 commit 1c83988
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/tls/openssl/sni.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,8 @@ static int ssl_servername_handler(SSL *ssl, int *al, void *arg)
const char *sni;

sni = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
if (!str_isset(sni)) {
*al = SSL_AD_UNRECOGNIZED_NAME;
return SSL_TLSEXT_ERR_ALERT_FATAL;
}
if (!str_isset(sni))
return SSL_TLSEXT_ERR_OK;

/* find and apply matching certificate */
uc = tls_cert_for_sni(tls, sni);
Expand Down

0 comments on commit 1c83988

Please sign in to comment.