Commit bd3db824 authored by Mark Karpilovskij's avatar Mark Karpilovskij
Browse files

kdig: warn if no hostname is used with +tls-ca

parent 817bab9e
Pipeline #32768 passed with stages
in 11 minutes and 27 seconds
......@@ -224,6 +224,9 @@ static int verify_certificate(gnutls_session_t session)
.data = (void *)ctx->params->hostname }
};
size_t data_count = (ctx->params->hostname != NULL) ? 2 : 1;
if (data_count == 1) {
WARN("TLS, no hostname provided, will not verify certificate owner\n")
}
unsigned int status;
ret = gnutls_certificate_verify_peers(session, data, data_count, &status);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment