aboutsummaryrefslogtreecommitdiff
path: root/lib/sslgen.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-02-20 09:56:26 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-02-20 09:56:26 +0000
commit53a549000c3634f6b0a5ed262d5834c3145885d7 (patch)
tree53ed658f9b454a41bf4f1a4c62573f2f0db8e667 /lib/sslgen.c
parent55700cb01f4a01b8187f387e1655371e6fe0703a (diff)
- Based on initial work done by Gautam Kachroo to address a bug, we now keep
better control at the exact state of the connection's SSL status so that we know exactly when it has completed the SSL negotiation or not so that there won't be accidental re-uses of connections that are wrongly believed to be in SSL-completed-negotiate state.
Diffstat (limited to 'lib/sslgen.c')
-rw-r--r--lib/sslgen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sslgen.c b/lib/sslgen.c
index 5719c0bf2..bbcc8c56d 100644
--- a/lib/sslgen.c
+++ b/lib/sslgen.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -207,6 +207,7 @@ Curl_ssl_connect(struct connectdata *conn, int sockindex)
#ifdef USE_SSL
/* mark this is being ssl enabled from here on. */
conn->ssl[sockindex].use = TRUE;
+ conn->ssl[sockindex].state = ssl_connection_negotiating;
#ifdef USE_SSLEAY
return Curl_ossl_connect(conn, sockindex);
@@ -473,6 +474,7 @@ CURLcode Curl_ssl_shutdown(struct connectdata *conn, int sockindex)
#endif /* USE_SSLEAY */
conn->ssl[sockindex].use = FALSE; /* get back to ordinary socket usage */
+ conn->ssl[sockindex].state = ssl_connection_none;
return CURLE_OK;
}