Botan 3.6.1
Crypto and TLS for C&
Botan::TLS::Session_Ticket_Extension Class Referencefinal

#include <tls_extensions.h>

Inheritance diagram for Botan::TLS::Session_Ticket_Extension:
Botan::TLS::Extension

Public Member Functions

const Session_Ticketcontents () const
 
bool empty () const override
 
virtual bool is_implemented () const
 
std::vector< uint8_t > serialize (Connection_Side) const override
 
 Session_Ticket_Extension ()=default
 
 Session_Ticket_Extension (Session_Ticket session_ticket)
 
 Session_Ticket_Extension (TLS_Data_Reader &reader, uint16_t extension_size)
 
Extension_Code type () const override
 

Static Public Member Functions

static Extension_Code static_type ()
 

Detailed Description

Session Ticket Extension (RFC 5077)

Definition at line 281 of file tls_extensions.h.

Constructor & Destructor Documentation

◆ Session_Ticket_Extension() [1/3]

Botan::TLS::Session_Ticket_Extension::Session_Ticket_Extension ( )
default

Create empty extension, used by both client and server

◆ Session_Ticket_Extension() [2/3]

Botan::TLS::Session_Ticket_Extension::Session_Ticket_Extension ( Session_Ticket session_ticket)
inlineexplicit

Extension with ticket, used by client

Definition at line 300 of file tls_extensions.h.

300: m_ticket(std::move(session_ticket)) {}

◆ Session_Ticket_Extension() [3/3]

Botan::TLS::Session_Ticket_Extension::Session_Ticket_Extension ( TLS_Data_Reader & reader,
uint16_t extension_size )

Deserialize a session ticket

Definition at line 654 of file tls_extensions.cpp.

654 :
655 m_ticket(Session_Ticket(reader.get_elem<uint8_t, std::vector<uint8_t>>(extension_size))) {}
Strong< std::vector< uint8_t >, struct Session_Ticket_ > Session_Ticket
holds a TLS 1.2 session ticket for stateless resumption
Definition tls_session.h:35

Member Function Documentation

◆ contents()

const Session_Ticket & Botan::TLS::Session_Ticket_Extension::contents ( ) const
inline
Returns
contents of the session ticket

Definition at line 290 of file tls_extensions.h.

290{ return m_ticket; }

◆ empty()

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

Implements Botan::TLS::Extension.

Definition at line 309 of file tls_extensions.h.

309{ return false; }

◆ is_implemented()

virtual bool Botan::TLS::Extension::is_implemented ( ) const
inlinevirtualinherited
Returns
true if this extension is known and implemented by Botan

Reimplemented in Botan::TLS::Unknown_Extension.

Definition at line 116 of file tls_extensions.h.

116{ return true; }

◆ serialize()

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

Implements Botan::TLS::Extension.

Definition at line 307 of file tls_extensions.h.

307{ return m_ticket.get(); }
constexpr T & get() &
Definition strong_type.h:50

◆ static_type()

static Extension_Code Botan::TLS::Session_Ticket_Extension::static_type ( )
inlinestatic

Definition at line 283 of file tls_extensions.h.

◆ type()

Extension_Code Botan::TLS::Session_Ticket_Extension::type ( ) const
inlineoverridevirtual
Returns
code number of the extension

Implements Botan::TLS::Extension.

Definition at line 285 of file tls_extensions.h.

285{ return static_type(); }
static Extension_Code static_type()

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