Botan 3.6.1
Crypto and TLS for C&
Botan::TLS::Channel_Impl_13::AggregatedMessages Class Reference

#include <tls_channel_impl_13.h>

Inheritance diagram for Botan::TLS::Channel_Impl_13::AggregatedMessages:
Botan::TLS::Channel_Impl_13::AggregatedHandshakeMessages Botan::TLS::Channel_Impl_13::AggregatedPostHandshakeMessages

Public Member Functions

 AggregatedMessages (AggregatedMessages &&)=delete
 
 AggregatedMessages (Channel_Impl_13 &channel, Handshake_Layer &handshake_layer)
 
 AggregatedMessages (const AggregatedMessages &)=delete
 
bool contains_messages () const
 
AggregatedMessagesoperator= (AggregatedMessages &&)=delete
 
AggregatedMessagesoperator= (const AggregatedMessages &)=delete
 
std::vector< uint8_t > send ()
 
 ~AggregatedMessages ()=default
 

Protected Attributes

Channel_Impl_13m_channel
 
Handshake_Layerm_handshake_layer
 
std::vector< uint8_t > m_message_buffer
 

Detailed Description

Helper class to coalesce handshake messages into a single TLS record of type 'Handshake'. This is used entirely internally in the Channel, Client and Server implementations.

Note that implementations should use the derived classes that either aggregate conventional Handshake messages or Post-Handshake messages.

Definition at line 59 of file tls_channel_impl_13.h.

Constructor & Destructor Documentation

◆ AggregatedMessages() [1/3]

Botan::TLS::Channel_Impl_13::AggregatedMessages::AggregatedMessages ( Channel_Impl_13 & channel,
Handshake_Layer & handshake_layer )

Definition at line 220 of file tls_channel_impl_13.cpp.

◆ AggregatedMessages() [2/3]

Botan::TLS::Channel_Impl_13::AggregatedMessages::AggregatedMessages ( const AggregatedMessages & )
delete

◆ AggregatedMessages() [3/3]

Botan::TLS::Channel_Impl_13::AggregatedMessages::AggregatedMessages ( AggregatedMessages && )
delete

◆ ~AggregatedMessages()

Botan::TLS::Channel_Impl_13::AggregatedMessages::~AggregatedMessages ( )
default

Member Function Documentation

◆ contains_messages()

bool Botan::TLS::Channel_Impl_13::AggregatedMessages::contains_messages ( ) const
inline

Definition at line 78 of file tls_channel_impl_13.h.

78{ return !m_message_buffer.empty(); }

References m_message_buffer.

◆ operator=() [1/2]

AggregatedMessages & Botan::TLS::Channel_Impl_13::AggregatedMessages::operator= ( AggregatedMessages && )
delete

◆ operator=() [2/2]

AggregatedMessages & Botan::TLS::Channel_Impl_13::AggregatedMessages::operator= ( const AggregatedMessages & )
delete

◆ send()

std::vector< uint8_t > Botan::TLS::Channel_Impl_13::AggregatedMessages::send ( )

Send the messages aggregated in the message buffer. The buffer is returned if the sender needs to also handle it somehow. Most notable use: book keeping for a potential protocol downgrade in the client implementation.

Definition at line 242 of file tls_channel_impl_13.cpp.

242 {
245 return std::exchange(m_message_buffer, {});
246}
#define BOTAN_STATE_CHECK(expr)
Definition assert.h:41

References BOTAN_STATE_CHECK, and Botan::TLS::Handshake.

Referenced by Botan::TLS::Channel_Impl_13::send_handshake_message(), and Botan::TLS::Channel_Impl_13::send_post_handshake_message().

Member Data Documentation

◆ m_channel

Channel_Impl_13& Botan::TLS::Channel_Impl_13::AggregatedMessages::m_channel
protected

Definition at line 83 of file tls_channel_impl_13.h.

◆ m_handshake_layer

Handshake_Layer& Botan::TLS::Channel_Impl_13::AggregatedMessages::m_handshake_layer
protected

Definition at line 84 of file tls_channel_impl_13.h.

◆ m_message_buffer

std::vector<uint8_t> Botan::TLS::Channel_Impl_13::AggregatedMessages::m_message_buffer
protected

Definition at line 81 of file tls_channel_impl_13.h.

Referenced by contains_messages().


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