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>
16class RandomNumberGenerator;
43 const std::string& passphrase,
45 size_t max_sessions = 1000,
46 std::chrono::seconds session_lifetime = std::chrono::seconds(7200));
52 bool load_from_session_id(
const std::vector<uint8_t>& session_id,
58 void remove_entry(
const std::vector<uint8_t>& session_id)
override;
60 size_t remove_all()
override;
62 void save(
const Session& session_data)
override;
65 {
return m_session_lifetime; }
68 void prune_session_cache();
70 std::shared_ptr<SQL_Database> m_db;
73 size_t m_max_sessions;
74 std::chrono::seconds m_session_lifetime;
Session_Manager_SQL & operator=(const Session_Manager_SQL &)=delete
Session_Manager_SQL(const Session_Manager_SQL &)=delete
std::chrono::seconds session_lifetime() const override
#define BOTAN_PUBLIC_API(maj, min)
std::vector< T, secure_allocator< T > > secure_vector