From: opensignature Date: Sat, 30 Jul 2022 13:14:06 +0000 (+0200) Subject: openssl: add details to "unable to set client certificate" error X-Git-Tag: curl-7_85_0~98 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc8c859b0ca0694513fdff9e97b4d9e4a4f8d9b3;p=thirdparty%2Fcurl.git openssl: add details to "unable to set client certificate" error from: "curl: (58) unable to set client certificate" to: curl: (58) unable to set client certificate [error:0A00018F:SSL routines::ee key too small] Closes #9228 --- diff --git a/.mailmap b/.mailmap index bfa0774c4b..e55d77efd3 100644 --- a/.mailmap +++ b/.mailmap @@ -93,3 +93,4 @@ Christian Schmitz Max Mehl rzrymiak on github <106121613+rzrymiak@users.noreply.github.com> Oliver Roberts +opensignature on github diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 5a7a612407..c1be10516c 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -868,8 +868,9 @@ int cert_stuff(struct Curl_easy *data, } if(SSL_CTX_use_certificate(ctx, params.cert) != 1) { - failf(data, "unable to set client certificate"); - X509_free(params.cert); + failf(data, "unable to set client certificate [%s]", + ossl_strerror(ERR_get_error(), error_buffer, + sizeof(error_buffer))); return 0; } X509_free(params.cert); /* we don't need the handle any more... */