|
Botan 3.14.1
Crypto and TLS for C&
|
#include <tls_flight_13.h>
Classes | |
| struct | Dummy_ChangeCipherSpec |
| struct | Message_Info |
Public Types | |
| using | Message = std::variant<Dummy_ChangeCipherSpec, Message_Info> |
| enum class | PostHandshake : bool { No = false , Yes = true } |
Public Member Functions | |
| Flight & | add (Handshake_Message_13_Ref msg) & |
| Flight | add (Handshake_Message_13_Ref msg) && |
| Flight & | add_dummy_change_cipher_spec () & |
| Flight | add_dummy_change_cipher_spec () && |
| std::vector< Message > | commit () |
| Flight (const Flight &other)=delete | |
| Flight (Transcript_Hash_State &transcript_hash, Callbacks &callbacks) | |
| Flight & | operator= (const Flight &other)=delete |
| Flight & | operator= (Flight &&other)=delete |
| ~Flight ()=default | |
Protected Member Functions | |
| void | append (const Handshake_Message &message, PostHandshake post_handshake) |
| void | append_ccs () |
| Flight (Callbacks &callbacks) | |
| Flight (Flight &&other)=default | |
Helper class to coalesce handshake messages into a TLS flight. The class keeps track of the serialized messages and updates the transcript hash accordingly.
Once the flight is constructed, using code must commit() it and pass on the prepared list of serialized messages for sending. After commit() the flight object is invalid and must not be used anymore.
Note that this class takes references to transcript hash and callbacks objects. The caller is responsible for ensuring that these objects remain valid for the lifetime of the Flight object. The flight object is meant to be used in a single stack frame and not stored for later use.
Definition at line 38 of file tls_flight_13.h.
| using Botan::TLS::Flight::Message = std::variant<Dummy_ChangeCipherSpec, Message_Info> |
Definition at line 48 of file tls_flight_13.h.
|
strong |
| Enumerator | |
|---|---|
| No | |
| Yes | |
Definition at line 50 of file tls_flight_13.h.
|
inlineexplicitprotected |
Definition at line 53 of file tls_flight_13.h.
Referenced by add(), add(), add_dummy_change_cipher_spec(), add_dummy_change_cipher_spec(), Flight(), Flight(), operator=(), operator=(), and Botan::TLS::PostHandshakeFlight::PostHandshakeFlight().
|
protecteddefault |
References Flight().
|
inline |
Definition at line 58 of file tls_flight_13.h.
|
delete |
References Flight().
|
default |
|
inline |
Add a msg to this flight, updating the transcript hash associated with this flight and letting the user inspect the message first via the callbacks.
TODO(C++23): deducing-this
| msg | The handshake message to add to the flight |
| Invalid_State | if the flight was already committed |
Definition at line 78 of file tls_flight_13.h.
References append(), Flight(), and No.
Referenced by Botan::TLS::Client_Impl_13::create().
|
inline |
Add a msg to this flight, updating the transcript hash associated with this flight and letting the user inspect the message first via the callbacks.
TODO(C++23): deducing-this
| msg | The handshake message to add to the flight |
| Invalid_State | if the flight was already committed |
Definition at line 93 of file tls_flight_13.h.
|
inline |
Add a dummy ChangeCipherSpec message to the flight when following the compatibility mode for TLS 1.3. See RFC 9846 E.4 for details.
TODO(C++23): deducing-this
| Invalid_State | if the flight was already committed |
Definition at line 106 of file tls_flight_13.h.
References append_ccs(), and Flight().
|
inline |
Add a dummy ChangeCipherSpec message to the flight when following the compatibility mode for TLS 1.3. See RFC 9846 E.4 for details.
TODO(C++23): deducing-this
| Invalid_State | if the flight was already committed |
Definition at line 119 of file tls_flight_13.h.
References append_ccs(), and Flight().
|
protected |
Definition at line 42 of file tls_flight_13.cpp.
References BOTAN_ASSERT_NOMSG, BOTAN_STATE_CHECK, and No.
Referenced by add(), add(), Botan::TLS::PostHandshakeFlight::add(), and Botan::TLS::PostHandshakeFlight::add().
|
protected |
Definition at line 55 of file tls_flight_13.cpp.
References BOTAN_STATE_CHECK.
Referenced by add_dummy_change_cipher_spec(), and add_dummy_change_cipher_spec().
| std::vector< Flight::Message > Botan::TLS::Flight::commit | ( | ) |
Extract the messages from the flight for sending. This invalidates the flight object and it cannot be used anymore.
| Invalid_State | if the flight was already committed or if it is empty |
Definition at line 35 of file tls_flight_13.cpp.
References BOTAN_STATE_CHECK.