Botan  2.12.1
Crypto and TLS for C++11
Public Member Functions | List of all members
Botan::TLS::Unknown_Extension Class Referencefinal

#include <tls_extensions.h>

Inheritance diagram for Botan::TLS::Unknown_Extension:
Botan::TLS::Extension

Public Member Functions

bool empty () const override
 
std::vector< uint8_t > serialize (Connection_Side whoami) const override
 
Handshake_Extension_Type type () const override
 
 Unknown_Extension (Handshake_Extension_Type type, TLS_Data_Reader &reader, uint16_t extension_size)
 
const std::vector< uint8_t > & value ()
 

Detailed Description

Unknown extensions are deserialized as this type

Definition at line 468 of file tls_extensions.h.

Constructor & Destructor Documentation

◆ Unknown_Extension()

Botan::TLS::Unknown_Extension::Unknown_Extension ( Handshake_Extension_Type  type,
TLS_Data_Reader reader,
uint16_t  extension_size 
)

Definition at line 151 of file tls_extensions.cpp.

153  :
154  m_type(type),
155  m_value(reader.get_fixed<uint8_t>(extension_size))
156  {
157  }
Handshake_Extension_Type type() const override

Member Function Documentation

◆ empty()

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

Implements Botan::TLS::Extension.

Definition at line 479 of file tls_extensions.h.

479 { return false; }

◆ serialize()

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

Implements Botan::TLS::Extension.

Definition at line 159 of file tls_extensions.cpp.

160  {
161  throw Invalid_State("Cannot encode an unknown TLS extension");
162  }

◆ type()

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

Implements Botan::TLS::Extension.

Definition at line 481 of file tls_extensions.h.

481 { return m_type; }

◆ value()

const std::vector<uint8_t>& Botan::TLS::Unknown_Extension::value ( )
inline

Definition at line 477 of file tls_extensions.h.

477 { return m_value; }

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