mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
vtls_openssl: improve client certificate load failure error messages
This commit is contained in:
parent
58b0a8b059
commit
b3175a767d
@ -403,7 +403,10 @@ int cert_stuff(struct connectdata *conn,
|
|||||||
/* SSL_CTX_use_certificate_chain_file() only works on PEM files */
|
/* SSL_CTX_use_certificate_chain_file() only works on PEM files */
|
||||||
if(SSL_CTX_use_certificate_chain_file(ctx,
|
if(SSL_CTX_use_certificate_chain_file(ctx,
|
||||||
cert_file) != 1) {
|
cert_file) != 1) {
|
||||||
failf(data, SSL_CLIENT_CERT_ERR);
|
failf(data,
|
||||||
|
"could not load PEM client certificate, OpenSSL error %s, "
|
||||||
|
"(no key found, wrong pass phrase, or wrong file format?)",
|
||||||
|
ERR_error_string(ERR_get_error(), NULL) );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -415,7 +418,10 @@ int cert_stuff(struct connectdata *conn,
|
|||||||
if(SSL_CTX_use_certificate_file(ctx,
|
if(SSL_CTX_use_certificate_file(ctx,
|
||||||
cert_file,
|
cert_file,
|
||||||
file_type) != 1) {
|
file_type) != 1) {
|
||||||
failf(data, SSL_CLIENT_CERT_ERR);
|
failf(data,
|
||||||
|
"could not load ASN1 client certificate, OpenSSL error %s, "
|
||||||
|
"(no key found, wrong pass phrase, or wrong file format?)",
|
||||||
|
ERR_error_string(ERR_get_error(), NULL) );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user