Botan 3.6.1
Crypto and TLS for C&
|
#include <tls_messages.h>
Public Member Functions | |
std::vector< Signature_Scheme > | certificate_signature_schemes () const |
const std::vector< uint16_t > & | ciphersuites () const |
Client_Hello_13 (const Policy &policy, Callbacks &cb, RandomNumberGenerator &rng, std::string_view hostname, const std::vector< std::string > &next_protocols, std::optional< Session_with_Handle > &session, std::vector< ExternalPSK > psks) | |
const std::vector< uint8_t > & | cookie () const |
std::vector< uint8_t > | cookie_input_data () const |
std::set< Extension_Code > | extension_types () const |
const Extensions & | extensions () const |
std::optional< Protocol_Version > | highest_supported_version (const Policy &policy) const |
Protocol_Version | legacy_version () const |
std::vector< std::string > | next_protocols () const |
bool | offered_suite (uint16_t ciphersuite) const |
const std::vector< uint8_t > & | random () const |
void | retry (const Hello_Retry_Request &hrr, const Transcript_Hash_State &transcript_hash_state, Callbacks &cb, RandomNumberGenerator &rng) |
bool | sent_signature_algorithms () const |
std::vector< uint8_t > | serialize () const override |
const Session_ID & | session_id () const |
std::vector< Signature_Scheme > | signature_schemes () const |
std::string | sni_hostname () const |
std::vector< uint16_t > | srtp_profiles () const |
std::vector< Group_Params > | supported_dh_groups () const |
std::vector< Group_Params > | supported_ecc_curves () const |
std::vector< Protocol_Version > | supported_versions () const |
bool | supports_alpn () const |
Handshake_Type | type () const override |
std::string | type_string () const |
void | validate_updates (const Client_Hello_13 &new_ch) |
virtual Handshake_Type | wire_type () const |
Static Public Member Functions | |
static std::variant< Client_Hello_13, Client_Hello_12 > | parse (const std::vector< uint8_t > &buf) |
Protected Member Functions | |
const std::vector< uint8_t > & | compression_methods () const |
Protected Attributes | |
std::unique_ptr< Client_Hello_Internal > | m_data |
Definition at line 218 of file tls_messages.h.
Botan::TLS::Client_Hello_13::Client_Hello_13 | ( | const Policy & | policy, |
Callbacks & | cb, | ||
RandomNumberGenerator & | rng, | ||
std::string_view | hostname, | ||
const std::vector< std::string > & | next_protocols, | ||
std::optional< Session_with_Handle > & | session, | ||
std::vector< ExternalPSK > | psks ) |
Creates a client hello which might optionally use the passed-in session
for resumption. In that case, this will "extract" the master secret from the passed-in session
.
Definition at line 753 of file msg_client_hello.cpp.
References Botan::TLS::Policy::acceptable_certificate_signature_schemes(), Botan::TLS::Policy::acceptable_signature_schemes(), Botan::TLS::Policy::accepted_client_certificate_types(), Botan::TLS::Policy::accepted_server_certificate_types(), Botan::TLS::Policy::allow_tls12(), Botan::TLS::Policy::ciphersuite_list(), Botan::TLS::Client, Botan::TLS::Supported_Groups::ec_groups(), Botan::TLS::Policy::key_exchange_groups(), Botan::TLS::Client_Hello::m_data, Botan::TLS::make_hello_random(), Botan::TLS::Policy::negotiate_encrypt_then_mac(), Botan::TLS::Client_Hello::next_protocols(), Botan::TLS::PresharedKey, Botan::TLS::PSK, Botan::TLS::PSK_DHE_KE, Botan::TLS::Policy::record_size_limit(), Botan::TLS::Policy::support_cert_status_message(), Botan::TLS::Policy::tls_13_middlebox_compatibility_mode(), Botan::TLS::Callbacks::tls_modify_extensions(), Botan::TLS::Client_Hello::type(), and Botan::TLS::Policy::use_ecc_point_compression().
Referenced by parse().
|
inherited |
Definition at line 270 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data, and Botan::TLS::Client_Hello::signature_schemes().
Referenced by Botan::TLS::Certificate_13::Certificate_13().
|
inherited |
Definition at line 200 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
|
protectedinherited |
Definition at line 196 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
|
inherited |
Definition at line 387 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
|
inherited |
Definition at line 249 of file msg_client_hello.cpp.
References BOTAN_STATE_CHECK, and Botan::TLS::Client_Hello::m_data.
|
inherited |
Definition at line 204 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
Referenced by Botan::TLS::Server_Hello_12::Server_Hello_12(), and validate_updates().
|
inherited |
Definition at line 208 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
Referenced by Botan::TLS::Certificate_13::Certificate_13(), Botan::TLS::Server_Hello_13::create(), Botan::TLS::Encrypted_Extensions::Encrypted_Extensions(), Botan::TLS::Hello_Retry_Request::Hello_Retry_Request(), Botan::TLS::Server_Hello_13::Server_Hello_13(), and validate_updates().
std::optional< Protocol_Version > Botan::TLS::Client_Hello_13::highest_supported_version | ( | const Policy & | policy | ) | const |
Select the highest protocol version from the list of versions supported by the client. If no such version can be determind this returns std::nullopt.
Definition at line 1044 of file msg_client_hello.cpp.
References Botan::TLS::Policy::acceptable_protocol_version(), BOTAN_ASSERT_NONNULL, and Botan::TLS::Client_Hello::m_data.
|
inherited |
Return the version indicated in the ClientHello. This may differ from the version indicated in the supported_versions extension.
See RFC 8446 4.1.2: TLS 1.3, the client indicates its version preferences in the "supported_versions" extension (Section 4.2.1) and the legacy_version field MUST be set to 0x0303, which is the version number for TLS 1.2.
Definition at line 184 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
|
inherited |
Definition at line 373 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
Referenced by Botan::TLS::Client_Hello_12::Client_Hello_12(), Botan::TLS::Client_Hello_12::Client_Hello_12(), and Client_Hello_13().
|
inherited |
Definition at line 258 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
Referenced by Botan::TLS::Client_Hello_12::Client_Hello_12().
|
static |
Definition at line 866 of file msg_client_hello.cpp.
References Client_Hello_13().
|
inherited |
Definition at line 188 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
void Botan::TLS::Client_Hello_13::retry | ( | const Hello_Retry_Request & | hrr, |
const Transcript_Hash_State & | transcript_hash_state, | ||
Callbacks & | cb, | ||
RandomNumberGenerator & | rng ) |
Definition at line 877 of file msg_client_hello.cpp.
References BOTAN_ASSERT_NOMSG, BOTAN_STATE_CHECK, Botan::TLS::Ciphersuite::by_id(), Botan::TLS::Server_Hello::ciphersuite(), Botan::TLS::Client, Botan::TLS::Transcript_Hash_State::clone(), Botan::TLS::Cookie, Botan::TLS::Server_Hello::extensions(), Botan::TLS::Extensions::get(), Botan::TLS::Cookie::get_cookie(), Botan::TLS::Extensions::has(), Botan::TLS::Client_Hello::m_data, Botan::TLS::Callbacks::tls_modify_extensions(), and Botan::TLS::Client_Hello::type().
|
inherited |
Definition at line 369 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
|
overridevirtualinherited |
Implements Botan::TLS::Handshake_Message.
Definition at line 221 of file msg_client_hello.cpp.
References Botan::TLS::append_tls_length_value(), Botan::TLS::Client, and Botan::TLS::Client_Hello::m_data.
|
inherited |
Definition at line 192 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
Referenced by Botan::TLS::Client_Hello_12::session_handle().
|
inherited |
Definition at line 263 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
Referenced by Botan::TLS::Certificate_13::Certificate_13(), Botan::TLS::Client_Hello::certificate_signature_schemes(), and Botan::TLS::Handshake_State::choose_sig_format().
|
inherited |
Definition at line 303 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
Referenced by Botan::TLS::Certificate_13::Certificate_13(), and Botan::TLS::Certificate_Request_13::maybe_create().
|
inherited |
Definition at line 380 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
|
inherited |
Definition at line 289 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
|
inherited |
Definition at line 282 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
|
inherited |
Definition at line 321 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
|
inherited |
Definition at line 353 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::m_data.
Referenced by Botan::TLS::Server_Hello_12::Server_Hello_12(), and Botan::TLS::Server_Hello_12::Server_Hello_12().
|
overridevirtualinherited |
Implements Botan::TLS::Handshake_Message.
Definition at line 180 of file msg_client_hello.cpp.
References Botan::TLS::ClientHello.
Referenced by Botan::TLS::Client_Hello_12::Client_Hello_12(), Botan::TLS::Client_Hello_12::Client_Hello_12(), Client_Hello_13(), and retry().
|
inherited |
Definition at line 19 of file tls_handshake_state.cpp.
References Botan::TLS::handshake_type_to_string(), and Botan::TLS::Handshake_Message::type().
void Botan::TLS::Client_Hello_13::validate_updates | ( | const Client_Hello_13 & | new_ch | ) |
This validates that a Client Hello received after sending a Hello Retry Request was updated in accordance with RFC 8446 4.1.2. If issues are found, this method throws accordingly.
Definition at line 929 of file msg_client_hello.cpp.
References Botan::TLS::Client_Hello::extension_types(), Botan::TLS::Client_Hello::extensions(), Botan::TLS::Extensions::get(), Botan::TLS::Extensions::has(), Botan::TLS::Client_Hello::m_data, Botan::TLS::Cookie::static_type(), and Botan::TLS::EarlyDataIndication::static_type().
|
inlinevirtualinherited |
Reimplemented in Botan::TLS::Hello_Retry_Request.
Definition at line 39 of file tls_handshake_msg.h.
Referenced by Botan::TLS::Stream_Handshake_IO::send().
|
protectedinherited |
Definition at line 144 of file tls_messages.h.
Referenced by Botan::TLS::Client_Hello::certificate_signature_schemes(), Botan::TLS::Client_Hello::ciphersuites(), Botan::TLS::Client_Hello::Client_Hello(), Botan::TLS::Client_Hello_12::Client_Hello_12(), Botan::TLS::Client_Hello_12::Client_Hello_12(), Botan::TLS::Client_Hello_12::Client_Hello_12(), Client_Hello_13(), Botan::TLS::Client_Hello::compression_methods(), Botan::TLS::Client_Hello::cookie(), Botan::TLS::Client_Hello::cookie_input_data(), Botan::TLS::Client_Hello::extension_types(), Botan::TLS::Client_Hello::extensions(), highest_supported_version(), Botan::TLS::Client_Hello::legacy_version(), Botan::TLS::Client_Hello::next_protocols(), Botan::TLS::Client_Hello::offered_suite(), Botan::TLS::Client_Hello_12::prefers_compressed_ec_points(), Botan::TLS::Client_Hello::random(), Botan::TLS::Client_Hello_12::renegotiation_info(), retry(), Botan::TLS::Client_Hello_12::secure_renegotiation(), Botan::TLS::Client_Hello::sent_signature_algorithms(), Botan::TLS::Client_Hello::serialize(), Botan::TLS::Client_Hello::session_id(), Botan::TLS::Client_Hello_12::session_ticket(), Botan::TLS::Client_Hello::signature_schemes(), Botan::TLS::Client_Hello::sni_hostname(), Botan::TLS::Client_Hello::srtp_profiles(), Botan::TLS::Client_Hello::supported_dh_groups(), Botan::TLS::Client_Hello::supported_ecc_curves(), Botan::TLS::Client_Hello::supported_versions(), Botan::TLS::Client_Hello::supports_alpn(), Botan::TLS::Client_Hello_12::supports_cert_status_message(), Botan::TLS::Client_Hello_12::supports_encrypt_then_mac(), Botan::TLS::Client_Hello_12::supports_extended_master_secret(), Botan::TLS::Client_Hello_12::supports_session_ticket(), Botan::TLS::Client_Hello_12::update_hello_cookie(), and validate_updates().