Hi folks,
attached a simple patch to get the real OpenSSL errcode if SSL context
creation fails.
Also, it would be a consideration not to return CURLE_OUT_OF_MEMORY
generally. What do you think?
Regards,
Bjoern
diff -u -r curl-7.21.0.orig/lib/ssluse.c curl-7.21.0/lib/ssluse.c
--- curl-7.21.0.orig/lib/ssluse.c 2011-01-13 18:13:55.000000000 +0100
+++ curl-7.21.0/lib/ssluse.c 2011-01-13 18:14:13.000000000 +0100
@@ -1469,7 +1469,7 @@
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;
}
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html