diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-03-31 05:13:26 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-03-31 05:13:26 +0000 |
commit | 9558f229db056404ebc3b573f44bdc80790c2cfd (patch) | |
tree | 84658c028e41d0ce5a3cc1a99f2c9211f4d300ef /lib/ssluse.c | |
parent | 7917bfb1c92411ba7f1fe82b8adb7be6d2595d63 (diff) |
Fixup after talks with Richard Bramante. We should now make better
comparisons before re-using SSL connections and re-using SSL connection IDs.
Diffstat (limited to 'lib/ssluse.c')
-rw-r--r-- | lib/ssluse.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c index cee6ee0f5..89fca51bf 100644 --- a/lib/ssluse.c +++ b/lib/ssluse.c @@ -40,6 +40,7 @@ #include "urldata.h" #include "sendf.h" #include "formdata.h" /* for the boundary function */ +#include "url.h" /* for the ssl config check function */ #ifdef USE_SSLEAY #include <openssl/rand.h> @@ -522,7 +523,8 @@ static int Get_SSL_Session(struct connectdata *conn, /* not session ID means blank entry */ continue; if(curl_strequal(conn->name, check->name) && - (conn->remote_port == check->remote_port) ) { + (conn->remote_port == check->remote_port) && + Curl_ssl_config_matches(&conn->ssl_config, &check->ssl_config)) { /* yes, we have a session ID! */ data->state.sessionage++; /* increase general age */ check->age = data->state.sessionage; /* set this as used in this age */ @@ -546,6 +548,9 @@ static int Kill_Single_Session(struct curl_ssl_session *session) SSL_SESSION_free(session->sessionid); session->sessionid=NULL; session->age = 0; /* fresh */ + + Curl_free_ssl_config(&session->ssl_config); + free(session->name); session->name = NULL; /* no name */ @@ -637,6 +642,8 @@ static int Store_SSL_Session(struct connectdata *conn) store->name = strdup(conn->name); /* clone host name */ store->remote_port = conn->remote_port; /* port number */ + Curl_clone_ssl_config(&conn->ssl_config, &store->ssl_config); + return 0; } |