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
This commit is contained in:
opensignature 2022-07-30 15:14:06 +02:00 committed by Daniel Stenberg
parent e1acfafa49
commit dc8c859b0c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 4 additions and 2 deletions

View file

@ -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... */