aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tls_session_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tls/tls_session_manager.cpp')
-rw-r--r--src/tls/tls_session_manager.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/tls/tls_session_manager.cpp b/src/tls/tls_session_manager.cpp
index e5ec75c88..59fc75b9f 100644
--- a/src/tls/tls_session_manager.cpp
+++ b/src/tls/tls_session_manager.cpp
@@ -11,10 +11,12 @@
namespace Botan {
-bool TLS_Session_Manager_In_Memory::load_from_session_str(
- const std::string& session_str, TLS_Session& session)
+namespace TLS {
+
+bool Session_Manager_In_Memory::load_from_session_str(
+ const std::string& session_str, Session& session)
{
- std::map<std::string, TLS_Session>::iterator i = sessions.find(session_str);
+ std::map<std::string, Session>::iterator i = sessions.find(session_str);
if(i == sessions.end())
return false;
@@ -31,14 +33,14 @@ bool TLS_Session_Manager_In_Memory::load_from_session_str(
return true;
}
-bool TLS_Session_Manager_In_Memory::load_from_session_id(
- const MemoryRegion<byte>& session_id, TLS_Session& session)
+bool Session_Manager_In_Memory::load_from_session_id(
+ const MemoryRegion<byte>& session_id, Session& session)
{
return load_from_session_str(hex_encode(session_id), session);
}
-bool TLS_Session_Manager_In_Memory::load_from_host_info(
- const std::string& hostname, u16bit port, TLS_Session& session)
+bool Session_Manager_In_Memory::load_from_host_info(
+ const std::string& hostname, u16bit port, Session& session)
{
std::map<std::string, std::string>::iterator i;
@@ -59,17 +61,17 @@ bool TLS_Session_Manager_In_Memory::load_from_host_info(
return false;
}
-void TLS_Session_Manager_In_Memory::remove_entry(
+void Session_Manager_In_Memory::remove_entry(
const MemoryRegion<byte>& session_id)
{
- std::map<std::string, TLS_Session>::iterator i =
+ std::map<std::string, Session>::iterator i =
sessions.find(hex_encode(session_id));
if(i != sessions.end())
sessions.erase(i);
}
-void TLS_Session_Manager_In_Memory::save(const TLS_Session& session)
+void Session_Manager_In_Memory::save(const Session& session)
{
if(max_sessions != 0)
{
@@ -90,3 +92,5 @@ void TLS_Session_Manager_In_Memory::save(const TLS_Session& session)
}
}
+
+}