summaryrefslogtreecommitdiff
path: root/lib/ssluse.c
diff options
context:
space:
mode:
authorBjoern Sikora <bjoern.sikora@intra2net.com>2011-02-02 18:25:57 +0100
committerDaniel Stenberg <daniel@haxx.se>2011-02-02 18:25:57 +0100
commit0e9626ba39756b8f063e42ca035714ee65d160ee (patch)
treeefef8d8c1c5da655173959d89348db6548ceb074 /lib/ssluse.c
parent73eb9965cf3c553e354def0d8b55b066eb1fc074 (diff)
downloadcurl-0e9626ba39756b8f063e42ca035714ee65d160ee.tar.gz
ssluse: improved error message on SSL_CTX_new failures
"SSL: couldn't create a context" really isn't that helpful, now it'll also extract an explanation from OpenSSL and append to the right.
Diffstat (limited to 'lib/ssluse.c')
-rw-r--r--lib/ssluse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c
index ef60e5e34..121ba2bf6 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -1463,7 +1463,8 @@ ossl_connect_step1(struct connectdata *conn,
connssl->ctx = SSL_CTX_new(req_method);
if(!connssl->ctx) {
- failf(data, "SSL: couldn't create a context!");
+ failf(data, "SSL: couldn't create a context: %s",
+ ERR_error_string(ERR_peek_last_error(), NULL));
return CURLE_OUT_OF_MEMORY;
}