aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-01-03 17:36:15 +0000
committerlloyd <[email protected]>2012-01-03 17:36:15 +0000
commitc3d70530c76bc8ae2daf07cec1b6aed7b32b3799 (patch)
treec2f800f2384ce75e7456530a985dbb17dd40dd1a /src
parentfb999424cbbf9a891b46d2aac94cae49026a39f5 (diff)
If the handshake_fn returns false explicitly remove the session from
the cache. The current handshake will complete, but the session can not be resumed later.
Diffstat (limited to 'src')
-rw-r--r--src/tls/tls_client.cpp2
-rw-r--r--src/tls/tls_server.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/tls/tls_client.cpp b/src/tls/tls_client.cpp
index 098191597..5b1ae1a26 100644
--- a/src/tls/tls_client.cpp
+++ b/src/tls/tls_client.cpp
@@ -386,6 +386,8 @@ void TLS_Client::process_handshake_msg(Handshake_Type type,
if(handshake_fn(session_info))
session_manager.save(session_info);
+ else
+ session_manager.remove_entry(session_info.session_id());
secure_renegotiation.update(state->client_finished, state->server_finished);
diff --git a/src/tls/tls_server.cpp b/src/tls/tls_server.cpp
index 0e26ad31c..109835e4a 100644
--- a/src/tls/tls_server.cpp
+++ b/src/tls/tls_server.cpp
@@ -395,6 +395,8 @@ void TLS_Server::process_handshake_msg(Handshake_Type type,
if(handshake_fn(session_info))
session_manager.save(session_info);
+ else
+ session_manager.remove_entry(session_info.session_id());
secure_renegotiation.update(state->client_finished,
state->server_finished);