8 #ifndef BOTAN_TLS_SQL_SESSION_MANAGER_H__
9 #define BOTAN_TLS_SQL_SESSION_MANAGER_H__
11 #include <botan/tls_session_manager.h>
12 #include <botan/database.h>
13 #include <botan/rng.h>
42 const std::string& passphrase,
44 size_t max_sessions = 1000,
45 std::chrono::seconds session_lifetime = std::chrono::seconds(7200));
51 bool load_from_session_id(
const std::vector<uint8_t>& session_id,
57 void remove_entry(
const std::vector<uint8_t>& session_id)
override;
59 size_t remove_all()
override;
61 void save(
const Session& session_data)
override;
64 {
return m_session_lifetime; }
67 void prune_session_cache();
69 std::shared_ptr<SQL_Database> m_db;
72 size_t m_max_sessions;
73 std::chrono::seconds m_session_lifetime;
std::chrono::seconds session_lifetime() const override
std::vector< T, secure_allocator< T >> secure_vector
RandomNumberGenerator & m_rng