diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-09-02 21:03:41 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-09-02 21:03:41 +0000 |
commit | 6fa624cf8ca1f2880515344fff5e18039123f6cd (patch) | |
tree | cd23b341f5b129aea466924d8b46e8ec19802bea | |
parent | 5f60188b8adbe5055b0780df36caf3e209d06531 (diff) |
improved error message when client cert return failure
-rw-r--r-- | lib/ssluse.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c index 7e438caa9..aa77abba3 100644 --- a/lib/ssluse.c +++ b/lib/ssluse.c @@ -277,12 +277,15 @@ int cert_stuff(struct connectdata *conn, file_type = do_file_type(cert_type); +#define SSL_CLIENT_CERT_ERR \ + "unable to use client certificate (no key found or wrong pass phrase?)" + switch(file_type) { case SSL_FILETYPE_PEM: /* SSL_CTX_use_certificate_chain_file() only works on PEM files */ if(SSL_CTX_use_certificate_chain_file(ctx, cert_file) != 1) { - failf(data, "unable to set certificate file (wrong password?)"); + failf(data, SSL_CLIENT_CERT_ERR); return 0; } break; @@ -294,7 +297,7 @@ int cert_stuff(struct connectdata *conn, if(SSL_CTX_use_certificate_file(ctx, cert_file, file_type) != 1) { - failf(data, "unable to set certificate file (wrong password?)"); + failf(data, SSL_CLIENT_CERT_ERR); return 0; } break; |