diff options
author | Daniel Stenberg <daniel@haxx.se> | 2001-08-29 09:36:41 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2001-08-29 09:36:41 +0000 |
commit | 26983053c431bf470a7293d184447bcb44b98f68 (patch) | |
tree | c10d84fa142ff7ed2f069f93c6ec5b575d9469d6 /lib/ssluse.c | |
parent | 8e0043165a05318f46c9ba1b98c6c3e88245a5f0 (diff) |
take port numbers into account when finding a previous session from the
cache
Diffstat (limited to 'lib/ssluse.c')
-rw-r--r-- | lib/ssluse.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c index b8d91d59d..730ae41d3 100644 --- a/lib/ssluse.c +++ b/lib/ssluse.c @@ -371,7 +371,8 @@ static int Get_SSL_Session(struct connectdata *conn, if(!check->sessionid) /* not session ID means blank entry */ continue; - if(strequal(conn->name, check->name)) { + if(strequal(conn->name, check->name) && + (conn->remote_port == check->remote_port) ) { /* yes, we have a session ID! */ data->ssl.sessionage++; /* increase general age */ check->age = data->ssl.sessionage; /* set this as used in this age */ @@ -457,8 +458,9 @@ static int Store_SSL_Session(struct connectdata *conn) /* now init the session struct wisely */ store->sessionid = ssl_sessionid; - store->age = data->ssl.sessionage; /* set current age */ - store->name = strdup(conn->name); /* clone host name */ + store->age = data->ssl.sessionage; /* set current age */ + store->name = strdup(conn->name); /* clone host name */ + store->remote_port = conn->remote_port; /* port number */ return 0; } |