aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Frodl <mfrodl@redhat.com>2016-10-24 17:44:45 +0200
committerKamil Dudka <kdudka@redhat.com>2016-10-25 11:56:37 +0200
commiteb84412b33aa9cbe109d3e2874f9dbba48043263 (patch)
treef1813246483064c8f9359e435fcffc48f631f4bf
parentd2c6d1568e85b97cf3a74437709c52885da6aab8 (diff)
nss: fix tight loop in non-blocking TLS handhsake over proxy
... in case the handshake completes before entering CURLM_STATE_PROTOCONNECT Bug: https://bugzilla.redhat.com/1388162
-rw-r--r--RELEASE-NOTES2
-rw-r--r--lib/vtls/nss.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 1caf01ac3..a4e9b9295 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -56,6 +56,7 @@ This release includes the following bugfixes:
o INSTALL: converted to markdown => INSTALL.md
o curl_multi_remove_handle: fix a double-free [25]
o multi: fix inifinte loop in curl_multi_cleanup() [26]
+ o nss: fix tight loop in non-blocking TLS handhsake over proxy [27]
This release includes the following known bugs:
@@ -104,3 +105,4 @@ References to bug reports and discussions on issues:
[24] = https://curl.haxx.se/bug/?i=1069
[25] = https://curl.haxx.se/bug/?i=1083
[26] = https://curl.haxx.se/mail/lib-2016-10/0011.html
+ [27] = https://bugzilla.redhat.com/1388162
diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c
index 8c945548a..214c2240e 100644
--- a/lib/vtls/nss.c
+++ b/lib/vtls/nss.c
@@ -1921,8 +1921,11 @@ static CURLcode nss_connect_common(struct connectdata *conn, int sockindex,
const bool blocking = (done == NULL);
CURLcode result;
- if(connssl->state == ssl_connection_complete)
+ if(connssl->state == ssl_connection_complete) {
+ if(!blocking)
+ *done = TRUE;
return CURLE_OK;
+ }
if(connssl->connecting_state == ssl_connect_1) {
result = nss_setup_connect(conn, sockindex);