]> granicus.if.org Git - curl/commitdiff
Call ERR_peek_error instead of ERR_peek_last_error
authorDan Fandrich <dan@coneharvesters.com>
Thu, 10 Feb 2011 20:29:34 +0000 (12:29 -0800)
committerDan Fandrich <dan@coneharvesters.com>
Thu, 10 Feb 2011 20:29:34 +0000 (12:29 -0800)
The latter isn't available in older OpenSSL versions, and is
less useful since it returns the most recent error instead of
the first one encountered.

lib/ssluse.c

index 121ba2bf67c8af9334bc95007b7dc958b6504836..ec6c02a50f0d33b16593ceb9c959b05012e029fd 100644 (file)
@@ -1464,7 +1464,7 @@ ossl_connect_step1(struct connectdata *conn,
 
   if(!connssl->ctx) {
     failf(data, "SSL: couldn't create a context: %s",
-          ERR_error_string(ERR_peek_last_error(), NULL));
+          ERR_error_string(ERR_peek_error(), NULL));
     return CURLE_OUT_OF_MEMORY;
   }