create_server_ssl_connection(): Improve the error message
authorFabian Keil <fk@fabiankeil.de>
Wed, 26 Aug 2020 20:17:59 +0000 (22:17 +0200)
committerFabian Keil <fk@fabiankeil.de>
Tue, 1 Sep 2020 10:22:42 +0000 (12:22 +0200)
... that is emitted when the certificate validation fails.

Sponsored by: Robert Klemme

openssl.c

index 0005ed5..3cf65e5 100644 (file)
--- a/openssl.c
+++ b/openssl.c
@@ -1093,8 +1093,9 @@ extern int create_server_ssl_connection(struct client_state *csp)
       else
       {
          csp->server_cert_verification_result = verify_result;
-         log_error(LOG_LEVEL_ERROR, "SSL_get_verify_result failed: %s",
-            X509_verify_cert_error_string(verify_result));
+         log_error(LOG_LEVEL_ERROR,
+            "X509 certificate verification for %s failed: %s",
+            csp->http->hostport, X509_verify_cert_error_string(verify_result));
          ret = -1;
          goto exit;
       }