degesch: log certificate verification errors

At last, there should be no more serious issues with TLS.
This commit is contained in:
Přemysl Eric Janouch 2015-07-12 06:03:28 +02:00
parent c3243c8f50
commit 88b2200051
1 changed files with 7 additions and 0 deletions

View File

@ -3860,6 +3860,13 @@ transport_tls_verify_callback (int preverify_ok, X509_STORE_CTX *ctx)
log_server_status (s, s->buffer, "Certificate subject: #s", subject);
log_server_status (s, s->buffer, "Certificate issuer: #s", issuer);
if (!preverify_ok)
{
log_server_error (s, s->buffer,
"Certificate verification failed: #s",
X509_verify_cert_error_string (X509_STORE_CTX_get_error (ctx)));
}
free (subject);
free (issuer);
return preverify_ok;