From: Jacob Tolar Date: Mon, 22 Aug 2022 22:20:16 +0000 (-0500) Subject: openssl: add cert path in error message X-Git-Tag: curl-7_85_0~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=65bbb5e6f461af89b0901a3f3f14dad913bc2a36;p=thirdparty%2Fcurl.git openssl: add cert path in error message Closes #9349 --- diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index c1be10516c..3a594fec86 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -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;