From ed50e3f1b4bfafa9f0cb16626f6edd93e06cd14c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 4 Aug 2008 22:07:50 +0000 Subject: - Yehoshua Hershberg found a problem that would make libcurl re-use a connection with the multi interface even if a previous use of it caused a CURLE_PEER_FAILED_VERIFICATION to get returned. I now make sure that failed SSL connections properly close the connections. --- lib/http.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/http.c') diff --git a/lib/http.c b/lib/http.c index 173de8edc..a2a5cd1f5 100644 --- a/lib/http.c +++ b/lib/http.c @@ -1815,8 +1815,11 @@ static CURLcode https_connecting(struct connectdata *conn, bool *done) /* perform SSL initialization for this socket */ result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, done); - if(result) + if(result) { + conn->bits.close = TRUE; /* a failed connection is marked for closure + to prevent (bad) re-use or similar */ return result; + } return CURLE_OK; } -- cgit v1.2.3