9#ifndef BOTAN_TLS_SESSION_MANAGER_H_
10#define BOTAN_TLS_SESSION_MANAGER_H_
12#include <botan/mutex.h>
13#include <botan/tls_session.h>
14#include <botan/types.h>
16#if defined(BOTAN_HAS_TLS_13)
17 #include <botan/tls_psk_identity_13.h>
26class RandomNumberGenerator;
70 virtual std::optional<Session_Handle> establish(
const Session& session,
71 const std::optional<Session_ID>&
id = std::nullopt,
72 bool tls12_no_ticket =
false);
92#if defined(BOTAN_HAS_TLS_13)
120 virtual std::optional<std::pair<Session, uint16_t>> choose_from_offered_tickets(
121 const std::vector<PskIdentity>& tickets,
122 std::string_view hash_function,
275 std::shared_ptr<RandomNumberGenerator>
m_rng;
Helper class to embody a session handle in all protocol versions.
virtual ~Session_Manager()=default
virtual size_t remove(const Session_Handle &handle)=0
virtual std::optional< Session > retrieve_one(const Session_Handle &handle)=0
Internal retrieval function for a single session.
virtual void store(const Session &session, const Session_Handle &handle)=0
Save a Session under a Session_Handle (TLS Client)
recursive_mutex_type & mutex()
virtual std::vector< Session_with_Handle > find_some(const Server_Information &info, size_t max_sessions_hint)=0
Internal retrieval function to find sessions to resume.
virtual bool emits_session_tickets()
std::shared_ptr< RandomNumberGenerator > m_rng
virtual size_t remove_all()=0
#define BOTAN_PUBLIC_API(maj, min)