Skip to content
Snippets Groups Projects
Commit bd3db824 authored by Mark Karpilovskij's avatar Mark Karpilovskij
Browse files

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

parent 817bab9e
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment