aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tls_session_manager.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-06-29 13:08:18 +0000
committerlloyd <[email protected]>2012-06-29 13:08:18 +0000
commitb4b0f986adf31c94af35e9d8b69942c8ea865d7f (patch)
tree22444c587eff9b6a00870c7434b889d3ab461954 /src/tls/tls_session_manager.h
parent75d97d5d991cfe87ecea6626c17a777c82487fb4 (diff)
Add TLS::Session_Manager_Noop which just ignores all save requests.
Rename the sqlite module to sqlite3 as sometimes plain 'sqlite' is used to refer to sqlite2. Reduce the password check bits to 16 which is plenty.
Diffstat (limited to 'src/tls/tls_session_manager.h')
-rw-r--r--src/tls/tls_session_manager.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/tls/tls_session_manager.h b/src/tls/tls_session_manager.h
index fa1ecae39..c63ee39f6 100644
--- a/src/tls/tls_session_manager.h
+++ b/src/tls/tls_session_manager.h
@@ -76,8 +76,28 @@ class BOTAN_DLL Session_Manager
};
/**
-* A simple implementation of Session_Manager that just saves
-* values in memory, with no persistance abilities
+* An implementation of Session_Manager that does not save sessions at
+* all, preventing session resumption.
+*/
+class BOTAN_DLL Session_Manager_Noop : public Session_Manager
+ {
+ public:
+ bool load_from_session_id(const std::vector<byte>&, Session&)
+ { return false; }
+
+ bool load_from_host_info(const std::string&, u16bit, Session&)
+ { return false; }
+
+ void remove_entry(const std::vector<byte>&) {}
+
+ void save(const Session&) {}
+
+ std::chrono::seconds session_lifetime() const
+ { return std::chrono::seconds(0); }
+ };
+
+/**
+* An implementation of Session_Manager that saves values in memory
*/
class BOTAN_DLL Session_Manager_In_Memory : public Session_Manager
{