aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tls_session_manager.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-01-23 15:30:29 +0000
committerlloyd <[email protected]>2012-01-23 15:30:29 +0000
commita445f7f4a1089fc034c35c500e1572eb9518f44f (patch)
tree3231b324a290cb9c67e9a0512a40acad8fa024a1 /src/tls/tls_session_manager.cpp
parent8bba8bab6077ee184c102d6634b288e7dd32b1dc (diff)
Since this branch is hugely API breaking already, go ahead and put
everything into a new namespace (Botan::TLS), removing the TLS_ prefixes on everything.
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)
}
}
+
+}