7#ifndef BOTAN_TLS_SESSION_ID_H_
8#define BOTAN_TLS_SESSION_ID_H_
10#include <botan/strong_type.h>
11#include <botan/types.h>
32 return id1.
get() < id2.
get();
82 bool is_id()
const {
return std::holds_alternative<Session_ID>(m_handle); }
84 bool is_ticket()
const {
return std::holds_alternative<Session_Ticket>(m_handle); }
86 bool is_opaque_handle()
const {
return std::holds_alternative<Opaque_Session_Handle>(m_handle); }
101 std::optional<Session_ID> id()
const;
108 std::optional<Session_Ticket> ticket()
const;
110 decltype(
auto)
get()
const {
return m_handle; }
113 void validate_constraints()
const;
116 std::variant<Session_ID, Session_Ticket, Opaque_Session_Handle> m_handle;
#define BOTAN_PUBLIC_API(maj, min)
std::optional< Session_Ticket > ticket() const
decltype(auto) get() const
Session_Handle(Session_Ticket ticket)
bool is_opaque_handle() const
Session_Handle(Session_ID id)
Session_Handle(Opaque_Session_Handle ticket)
std::optional< Session_ID > id() const
bool operator<(const Server_Information &a, const Server_Information &b)
Strong< std::vector< uint8_t >, struct Session_ID_ > Session_ID
holds a TLS 1.2 session ID for stateful resumption
Strong< std::vector< uint8_t >, struct Session_Ticket_ > Session_Ticket
holds a TLS 1.2 session ticket for stateless resumption
Strong< std::vector< uint8_t >, struct Opaque_Session_Handle_ > Opaque_Session_Handle
holds an opaque session handle as used in TLS 1.3 that could be either a ticket for stateless resumpt...