Skip to content

Commit

Permalink
ssluse: improved error message on SSL_CTX_new failures
Browse files Browse the repository at this point in the history
"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.
  • Loading branch information
Bjoern Sikora authored and bagder committed Feb 2, 2011
1 parent 73eb996 commit 0e9626b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ssluse.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0e9626b

Please sign in to comment.