]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ssl: fix duplicated SSL handshake with multi interface and proxy
authorKamil Dudka <kdudka@redhat.com>
Fri, 8 Jun 2012 21:02:57 +0000 (23:02 +0200)
committerKamil Dudka <kdudka@redhat.com>
Fri, 8 Jun 2012 21:27:11 +0000 (23:27 +0200)
Bug: https://bugzilla.redhat.com/788526
Reported by: Enrico Scholz

RELEASE-NOTES
lib/sslgen.c

index 44dda1f037a352018914d38eca460abd4e6d5cc2..fa85b190b04327150e0b8bb34c7a05f1e918f01d 100644 (file)
@@ -24,6 +24,7 @@ This release includes the following bugfixes:
  o cmdline: made -D option work with -O and -J
  o configure: Fix libcurl.pc and curl-config generation for static MingW*
    cross builds
+ o ssl: fix duplicated SSL handshake with multi interface and proxy [1]
 
 This release includes the following known bugs:
 
@@ -39,4 +40,4 @@ advice from friends like these:
 
 References to bug reports and discussions on issues:
 
+ [1] = https://bugzilla.redhat.com/788526
index a77fd787409fbf575b38b32f2caeec5dce0a1292..14649a9ec5b5fe6fd925d3b86298cd6e6abee1a0 100644 (file)
@@ -211,18 +211,18 @@ CURLcode
 Curl_ssl_connect_nonblocking(struct connectdata *conn, int sockindex,
                              bool *done)
 {
-#ifdef curlssl_connect_nonblocking
   CURLcode res;
   /* mark this is being ssl requested from here on. */
   conn->ssl[sockindex].use = TRUE;
+#ifdef curlssl_connect_nonblocking
   res = curlssl_connect_nonblocking(conn, sockindex, done);
-  if(!res && *done)
-    Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */
-  return res;
 #else
   *done = TRUE; /* fallback to BLOCKING */
-  return Curl_ssl_connect(conn, sockindex);
+  res = curlssl_connect(conn, sockindex);
 #endif /* non-blocking connect support */
+  if(!res && *done)
+    Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */
+  return res;
 }
 
 /*