Skip to content

Commit 68857e4

Browse files
committed
ssl: fix duplicated SSL handshake with multi interface and proxy
Bug: https://bugzilla.redhat.com/788526 Reported by: Enrico Scholz
1 parent dd57619 commit 68857e4

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

RELEASE-NOTES

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ This release includes the following bugfixes:
2424
o cmdline: made -D option work with -O and -J
2525
o configure: Fix libcurl.pc and curl-config generation for static MingW*
2626
cross builds
27+
o ssl: fix duplicated SSL handshake with multi interface and proxy [1]
2728

2829
This release includes the following known bugs:
2930

@@ -39,4 +40,4 @@ advice from friends like these:
3940

4041
References to bug reports and discussions on issues:
4142

42-
43+
[1] = https://bugzilla.redhat.com/788526

lib/sslgen.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,18 +211,18 @@ CURLcode
211211
Curl_ssl_connect_nonblocking(struct connectdata *conn, int sockindex,
212212
bool *done)
213213
{
214-
#ifdef curlssl_connect_nonblocking
215214
CURLcode res;
216215
/* mark this is being ssl requested from here on. */
217216
conn->ssl[sockindex].use = TRUE;
217+
#ifdef curlssl_connect_nonblocking
218218
res = curlssl_connect_nonblocking(conn, sockindex, done);
219-
if(!res && *done)
220-
Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */
221-
return res;
222219
#else
223220
*done = TRUE; /* fallback to BLOCKING */
224-
return Curl_ssl_connect(conn, sockindex);
221+
res = curlssl_connect(conn, sockindex);
225222
#endif /* non-blocking connect support */
223+
if(!res && *done)
224+
Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */
225+
return res;
226226
}
227227

228228
/*

0 commit comments

Comments
 (0)