Botan 3.5.0
Crypto and TLS for C&
Botan::TLS::Handshake_IO Class Referenceabstract

#include <tls_handshake_io.h>

Inheritance diagram for Botan::TLS::Handshake_IO:
Botan::TLS::Datagram_Handshake_IO Botan::TLS::Stream_Handshake_IO

Public Member Functions

virtual void add_record (const uint8_t record[], size_t record_len, Record_Type type, uint64_t sequence_number)=0
 
virtual std::vector< uint8_t > format (const std::vector< uint8_t > &handshake_msg, Handshake_Type handshake_type) const =0
 
virtual std::pair< Handshake_Type, std::vector< uint8_t > > get_next_record (bool expecting_ccs)=0
 
 Handshake_IO ()=default
 
 Handshake_IO (const Handshake_IO &)=delete
 
virtual bool have_more_data () const =0
 
virtual Protocol_Version initial_record_version () const =0
 
Handshake_IOoperator= (const Handshake_IO &)=delete
 
virtual std::vector< uint8_t > send (const Handshake_Message &msg)=0
 
virtual std::vector< uint8_t > send_under_epoch (const Handshake_Message &msg, uint16_t epoch)=0
 
virtual bool timeout_check ()=0
 
virtual ~Handshake_IO ()=default
 

Detailed Description

Handshake IO Interface

This interface abstracts over stream and datagram processing of handshake messages. It receives individual records from the channel via add_record and provides a sending interface via a callback function provided by the channel.

Handshake message headers are parsed and removed in get_next_record. The result is provided back to the channel via Handshake_State::get_next_handshake_msg.

send is used by individual handshake message implementations, which send themselves, as well as both client and server to dispatch CCS messaged (and Hello_Verify_Request in the server case). Before calling the writer_fn, format is called to add the handshake message header (except for CCS).

The buffer returned by send is used to update the transcript record hash (where desired).

Definition at line 44 of file tls_handshake_io.h.

Constructor & Destructor Documentation

◆ Handshake_IO() [1/2]

Botan::TLS::Handshake_IO::Handshake_IO ( )
default

◆ Handshake_IO() [2/2]

Botan::TLS::Handshake_IO::Handshake_IO ( const Handshake_IO & )
delete

◆ ~Handshake_IO()

virtual Botan::TLS::Handshake_IO::~Handshake_IO ( )
virtualdefault

Member Function Documentation

◆ add_record()

virtual void Botan::TLS::Handshake_IO::add_record ( const uint8_t record[],
size_t record_len,
Record_Type type,
uint64_t sequence_number )
pure virtual

◆ format()

virtual std::vector< uint8_t > Botan::TLS::Handshake_IO::format ( const std::vector< uint8_t > & handshake_msg,
Handshake_Type handshake_type ) const
pure virtual

◆ get_next_record()

virtual std::pair< Handshake_Type, std::vector< uint8_t > > Botan::TLS::Handshake_IO::get_next_record ( bool expecting_ccs)
pure virtual

Returns (HANDSHAKE_NONE, std::vector<>()) if no message currently available

Implemented in Botan::TLS::Datagram_Handshake_IO, and Botan::TLS::Stream_Handshake_IO.

◆ have_more_data()

virtual bool Botan::TLS::Handshake_IO::have_more_data ( ) const
pure virtual

◆ initial_record_version()

virtual Protocol_Version Botan::TLS::Handshake_IO::initial_record_version ( ) const
pure virtual

◆ operator=()

Handshake_IO & Botan::TLS::Handshake_IO::operator= ( const Handshake_IO & )
delete

◆ send()

◆ send_under_epoch()

virtual std::vector< uint8_t > Botan::TLS::Handshake_IO::send_under_epoch ( const Handshake_Message & msg,
uint16_t epoch )
pure virtual

◆ timeout_check()

virtual bool Botan::TLS::Handshake_IO::timeout_check ( )
pure virtual

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