Botan  2.4.0
Crypto and TLS for C++11
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 () 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 192 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 213 of file tls_extensions.h.

213  :
214  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 618 of file tls_extensions.cpp.

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

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 203 of file tls_extensions.h.

203 { 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 223 of file tls_extensions.h.

223 { return false; }

◆ serialize()

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

Implements Botan::TLS::Extension.

Definition at line 221 of file tls_extensions.h.

221 { return m_ticket; }

◆ static_type()

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

◆ type()

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

Implements Botan::TLS::Extension.

Definition at line 198 of file tls_extensions.h.

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

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