Botan  2.6.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 193 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 214 of file tls_extensions.h.

214  :
215  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 443 of file tls_extensions.cpp.

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

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

204 { 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 224 of file tls_extensions.h.

224 { 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 222 of file tls_extensions.h.

222 { return m_ticket; }

◆ static_type()

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

Definition at line 196 of file tls_extensions.h.

References Botan::TLS::TLSEXT_SESSION_TICKET.

Referenced by type().

◆ type()

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

Implements Botan::TLS::Extension.

Definition at line 199 of file tls_extensions.h.

References static_type().

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

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