]> granicus.if.org Git - curl/commitdiff
openssl: use correct port number in error message
authorDaniel Stenberg <daniel@haxx.se>
Wed, 18 Sep 2013 21:03:30 +0000 (23:03 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 21 Sep 2013 19:01:00 +0000 (21:01 +0200)
In ossl_connect_step2() when the "Unknown SSL protocol error" occurs, it
would output the local port number instead of the remote one which
showed when doing SSL over a proxy (but with the correct remote host
name). As libcurl only speaks SSL to the remote we know it is the remote
port.

Bug: http://curl.haxx.se/bug/view.cgi?id=1281
Reported-by: Gordon Marler
lib/ssluse.c

index 57e8bea0b9404a3e57f80baffa358c4c6acd4abf..bd9f3d480c0dc7faf54cb1602f646f9f8ea729b8 100644 (file)
@@ -1810,7 +1810,7 @@ ossl_connect_step2(struct connectdata *conn, int sockindex)
        */
       if(CURLE_SSL_CONNECT_ERROR == rc && errdetail == 0) {
         failf(data, "Unknown SSL protocol error in connection to %s:%ld ",
-              conn->host.name, conn->port);
+              conn->host.name, conn->remote_port);
         return rc;
       }
       /* Could be a CERT problem */