diff options
author | lloyd <[email protected]> | 2012-09-09 17:04:39 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-09-09 17:04:39 +0000 |
commit | 8af91eb14bbf2f9b7c7ba8b59a78aeff1be87352 (patch) | |
tree | 6aafa214a18bf1866cdb31da4b5126f9443c610b | |
parent | c5a6db501a92cd9a628ed051d2f26bcecd4b5587 (diff) |
Also hide Channel::m_handshake_fn
-rw-r--r-- | src/tls/tls_channel.h | 4 | ||||
-rw-r--r-- | src/tls/tls_client.cpp | 2 | ||||
-rw-r--r-- | src/tls/tls_server.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/tls/tls_channel.h b/src/tls/tls_channel.h index 4ac5570db..d5ae4b1cd 100644 --- a/src/tls/tls_channel.h +++ b/src/tls/tls_channel.h @@ -160,8 +160,7 @@ class BOTAN_DLL Channel Session_Manager& session_manager() { return m_session_manager; } - /* state accesssible by subclasses */ - std::function<bool (const Session&)> m_handshake_fn; + bool save_session(const Session& session) const { return m_handshake_fn(session); } private: void send_record(byte type, const byte input[], size_t length); @@ -173,6 +172,7 @@ class BOTAN_DLL Channel bool heartbeat_sending_allowed() const; /* callbacks */ + std::function<bool (const Session&)> m_handshake_fn; std::function<void (const byte[], size_t, Alert)> m_proc_fn; std::function<void (const byte[], size_t)> m_output_fn; diff --git a/src/tls/tls_client.cpp b/src/tls/tls_client.cpp index ef269a493..b40c86f5c 100644 --- a/src/tls/tls_client.cpp +++ b/src/tls/tls_client.cpp @@ -521,7 +521,7 @@ void Client::process_handshake_msg(const Handshake_State* active_state, "" ); - const bool should_save = m_handshake_fn(session_info); + const bool should_save = save_session(session_info); if(!session_id.empty()) { diff --git a/src/tls/tls_server.cpp b/src/tls/tls_server.cpp index 723735deb..313b23a0a 100644 --- a/src/tls/tls_server.cpp +++ b/src/tls/tls_server.cpp @@ -410,7 +410,7 @@ void Server::process_handshake_msg(const Handshake_State* active_state, state.compute_session_keys(session_info.master_secret()); - if(!m_handshake_fn(session_info)) + if(!save_session(session_info)) { session_manager().remove_entry(session_info.session_id()); @@ -677,7 +677,7 @@ void Server::process_handshake_msg(const Handshake_State* active_state, state.srp_identifier() ); - if(m_handshake_fn(session_info)) + if(save_session(session_info)) { if(state.server_hello()->supports_session_ticket()) { |