Botan 2.19.1
Crypto and TLS for C&
Public Member Functions | Static Public Member Functions | List of all members
Botan::TLS::Session_Ticket Class Referencefinal

#include <tls_extensions.h>

Inheritance diagram for Botan::TLS::Session_Ticket:
Botan::TLS::Extension

Public Member Functions

const std::vector< uint8_t > & contents () const
 
bool empty () const override
 
std::vector< uint8_t > serialize (Connection_Side) const override
 
 Session_Ticket ()=default
 
 Session_Ticket (const std::vector< uint8_t > &session_ticket)
 
 Session_Ticket (TLS_Data_Reader &reader, uint16_t extension_size)
 
Handshake_Extension_Type type () const override
 

Static Public Member Functions

static Handshake_Extension_Type static_type ()
 

Detailed Description

Session Ticket Extension (RFC 5077)

Definition at line 200 of file tls_extensions.h.

Constructor & Destructor Documentation

◆ Session_Ticket() [1/3]

Botan::TLS::Session_Ticket::Session_Ticket ( )
default

Create empty extension, used by both client and server

◆ Session_Ticket() [2/3]

Botan::TLS::Session_Ticket::Session_Ticket ( const std::vector< uint8_t > &  session_ticket)
inlineexplicit

Extension with ticket, used by client

Definition at line 221 of file tls_extensions.h.

221 :
222 m_ticket(session_ticket) {}

◆ Session_Ticket() [3/3]

Botan::TLS::Session_Ticket::Session_Ticket ( TLS_Data_Reader reader,
uint16_t  extension_size 
)

Deserialize a session ticket

Definition at line 459 of file tls_extensions.cpp.

460 : m_ticket(reader.get_elem<uint8_t, std::vector<uint8_t>>(extension_size))
461 {}

Member Function Documentation

◆ contents()

const std::vector< uint8_t > & Botan::TLS::Session_Ticket::contents ( ) const
inline
Returns
contents of the session ticket

Definition at line 211 of file tls_extensions.h.

211{ return m_ticket; }

◆ empty()

bool Botan::TLS::Session_Ticket::empty ( ) const
inlineoverridevirtual
Returns
if we should encode this extension or not

Implements Botan::TLS::Extension.

Definition at line 231 of file tls_extensions.h.

231{ return false; }

◆ serialize()

std::vector< uint8_t > Botan::TLS::Session_Ticket::serialize ( Connection_Side  whoami) const
inlineoverridevirtual
Returns
serialized binary for the extension

Implements Botan::TLS::Extension.

Definition at line 229 of file tls_extensions.h.

229{ return m_ticket; }

◆ static_type()

static Handshake_Extension_Type Botan::TLS::Session_Ticket::static_type ( )
inlinestatic

Definition at line 203 of file tls_extensions.h.

204 { return TLSEXT_SESSION_TICKET; }
@ TLSEXT_SESSION_TICKET

References Botan::TLS::TLSEXT_SESSION_TICKET.

◆ type()

Handshake_Extension_Type Botan::TLS::Session_Ticket::type ( ) const
inlineoverridevirtual
Returns
code number of the extension

Implements Botan::TLS::Extension.

Definition at line 206 of file tls_extensions.h.

206{ return static_type(); }
static Handshake_Extension_Type static_type()

The documentation for this class was generated from the following files: