9#ifndef BOTAN_TLS_SESSION_MANAGER_HYBRID_H_
10#define BOTAN_TLS_SESSION_MANAGER_HYBRID_H_
12#include <botan/tls_session_manager.h>
13#include <botan/tls_session_manager_stateless.h>
19class RandomNumberGenerator;
53 const std::shared_ptr<Credentials_Manager>& credentials_manager,
54 const std::shared_ptr<RandomNumberGenerator>& rng,
55 bool prefer_tickets =
true);
57 std::optional<Session_Handle> establish(
const Session& session,
58 const std::optional<Session_ID>&
id = std::nullopt,
59 bool tls12_no_ticket =
false)
override;
63 const Policy& policy)
override;
67 const Policy& policy)
override {
68 return m_stateful->find(info, callbacks, policy);
75 size_t remove_all()
override {
return m_stateful->remove_all(); }
77 bool emits_session_tickets()
override;
94 std::unique_ptr<Session_Manager> m_stateful;
97 bool m_prefer_tickets;
#define BOTAN_ASSERT(expr, assertion_made)
Helper class to embody a session handle in all protocol versions.
std::optional< Session > retrieve_one(const Session_Handle &) override
Internal retrieval function for a single session.
size_t remove(const Session_Handle &handle) override
std::vector< Session_with_Handle > find_some(const Server_Information &, const size_t) override
Internal retrieval function to find sessions to resume.
size_t remove_all() override
void store(const Session &session, const Session_Handle &handle) override
Save a Session under a Session_Handle (TLS Client)
std::vector< Session_with_Handle > find(const Server_Information &info, Callbacks &callbacks, const Policy &policy) override
Find all sessions that match a given server info.
Session_Manager * underlying_stateful_manager()
int(* final)(unsigned char *, CTX *)
#define BOTAN_PUBLIC_API(maj, min)