Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tls/sni: do not enable client verification when SNI matching is done #1172

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions src/tls/openssl/sni.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,30 +135,6 @@ struct tls_cert *tls_cert_for_sni(const struct tls *tls, const char *sni)
}


static int ssl_set_verify_client(SSL *ssl, const char *host)
{
struct sa sa;

if (!ssl || !host)
return EINVAL;

if (sa_set_str(&sa, host, 0)) {
SSL_set_hostflags(ssl,
X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);

if (!SSL_set1_host(ssl, host)) {
DEBUG_WARNING("SSL_set1_host error\n");
ERR_clear_error();
return EPROTO;
}
}

SSL_set_verify(ssl, SSL_VERIFY_PEER, tls_verify_handler);

return 0;
}


static int ssl_servername_handler(SSL *ssl, int *al, void *arg)
{
struct tls *tls = arg;
Expand All @@ -185,8 +161,6 @@ static int ssl_servername_handler(SSL *ssl, int *al, void *arg)
return SSL_TLSEXT_ERR_ALERT_FATAL;
}

(void)ssl_set_verify_client(ssl, tls_cert_host(uc));

return SSL_TLSEXT_ERR_OK;
}

Expand Down
Loading