]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
openssl: add cert path in error message
authorJacob Tolar <jtolar@verizonmedia.com>
Mon, 22 Aug 2022 22:20:16 +0000 (17:20 -0500)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 27 Aug 2022 21:26:42 +0000 (23:26 +0200)
Closes #9349

lib/vtls/openssl.c

index c1be10516c276ad6dea3a620b14ffd248414fd55..3a594fec860611964d45441d17c321841bdb5175 100644 (file)
@@ -793,9 +793,10 @@ int cert_stuff(struct Curl_easy *data,
         SSL_CTX_use_certificate_chain_file(ctx, cert_file);
       if(cert_use_result != 1) {
         failf(data,
-              "could not load PEM client certificate, " OSSL_PACKAGE
+              "could not load PEM client certificate from %s, " OSSL_PACKAGE
               " error %s, "
               "(no key found, wrong pass phrase, or wrong file format?)",
+              (cert_blob ? "CURLOPT_SSLCERT_BLOB" : cert_file),
               ossl_strerror(ERR_get_error(), error_buffer,
                             sizeof(error_buffer)) );
         return 0;
@@ -813,9 +814,10 @@ int cert_stuff(struct Curl_easy *data,
         SSL_CTX_use_certificate_file(ctx, cert_file, file_type);
       if(cert_use_result != 1) {
         failf(data,
-              "could not load ASN1 client certificate, " OSSL_PACKAGE
+              "could not load ASN1 client certificate from %s, " OSSL_PACKAGE
               " error %s, "
               "(no key found, wrong pass phrase, or wrong file format?)",
+              (cert_blob ? "CURLOPT_SSLCERT_BLOB" : cert_file),
               ossl_strerror(ERR_get_error(), error_buffer,
                             sizeof(error_buffer)) );
         return 0;