Botan 3.0.0-alpha0
Crypto and TLS for C&
Classes | Public Member Functions | Protected Attributes | List of all members
Botan::TLS::Client_Hello_12 Class Referencefinal

#include <tls_messages.h>

Inheritance diagram for Botan::TLS::Client_Hello_12:
Botan::TLS::Client_Hello Botan::TLS::Handshake_Message

Classes

class  Settings
 

Public Member Functions

const std::vector< uint16_t > & ciphersuites () const
 
 Client_Hello_12 (const std::vector< uint8_t > &buf)
 
 Client_Hello_12 (Handshake_IO &io, Handshake_Hash &hash, const Policy &policy, Callbacks &cb, RandomNumberGenerator &rng, const std::vector< uint8_t > &reneg_info, const Session &session, const std::vector< std::string > &next_protocols)
 
 Client_Hello_12 (Handshake_IO &io, Handshake_Hash &hash, const Policy &policy, Callbacks &cb, RandomNumberGenerator &rng, const std::vector< uint8_t > &reneg_info, const Settings &client_settings, const std::vector< std::string > &next_protocols)
 
const std::vector< uint8_t > & compression_methods () const
 
const std::vector< uint8_t > & cookie () const
 
std::vector< uint8_t > cookie_input_data () const
 
std::set< Handshake_Extension_Typeextension_types () const
 
const Extensionsextensions () const
 
Protocol_Version legacy_version () const
 
std::vector< std::string > next_protocols () const
 
bool offered_suite (uint16_t ciphersuite) const
 
bool prefers_compressed_ec_points () const
 
const std::vector< uint8_t > & random () const
 
std::vector< uint8_t > renegotiation_info () const
 
bool secure_renegotiation () const
 
bool sent_signature_algorithms () const
 
std::vector< uint8_t > serialize () const override
 
const std::vector< uint8_t > & session_id () const
 
std::vector< uint8_t > session_ticket () const
 
std::vector< Signature_Schemesignature_schemes () const
 
std::string sni_hostname () const
 
std::vector< uint16_t > srtp_profiles () const
 
std::vector< Group_Paramssupported_dh_groups () const
 
std::vector< Group_Paramssupported_ecc_curves () const
 
std::vector< Protocol_Versionsupported_versions () const
 
bool supports_alpn () const
 
bool supports_cert_status_message () const
 
bool supports_encrypt_then_mac () const
 
bool supports_extended_master_secret () const
 
bool supports_session_ticket () const
 
Handshake_Type type () const override
 
std::string type_string () const
 
void update_hello_cookie (const Hello_Verify_Request &hello_verify)
 
virtual Handshake_Type wire_type () const
 

Protected Attributes

std::vector< uint8_t > m_comp_methods
 
std::vector< uint8_t > m_cookie_input_bits
 
Extensions m_extensions
 
std::vector< uint8_t > m_hello_cookie
 
Protocol_Version m_legacy_version
 
std::vector< uint8_t > m_random
 
std::vector< uint8_t > m_session_id
 
std::vector< uint16_t > m_suites
 

Detailed Description

Definition at line 150 of file tls_messages.h.

Constructor & Destructor Documentation

◆ Client_Hello_12() [1/3]

Botan::TLS::Client_Hello_12::Client_Hello_12 ( const std::vector< uint8_t > &  buf)
inlineexplicit

Definition at line 170 of file tls_messages.h.

◆ Client_Hello_12() [2/3]

Botan::TLS::Client_Hello_12::Client_Hello_12 ( Handshake_IO io,
Handshake_Hash hash,
const Policy policy,
Callbacks cb,
RandomNumberGenerator rng,
const std::vector< uint8_t > &  reneg_info,
const Settings client_settings,
const std::vector< std::string > &  next_protocols 
)

Definition at line 361 of file msg_client_hello.cpp.

369 {
370 m_legacy_version = client_settings.protocol_version();
371 m_random = make_hello_random(rng, cb, policy);
372 m_suites = policy.ciphersuite_list(client_settings.protocol_version());
373
374 if(!policy.acceptable_protocol_version(m_legacy_version))
375 throw Internal_Error("Offering " + m_legacy_version.to_string() +
376 " but our own policy does not accept it");
377
378 /*
379 * Place all empty extensions in front to avoid a bug in some systems
380 * which reject hellos when the last extension in the list is empty.
381 */
382
383 // EMS must always be used with TLS 1.2, regardless of the policy used.
384 m_extensions.add(new Extended_Master_Secret);
385
386 if(policy.negotiate_encrypt_then_mac())
387 { m_extensions.add(new Encrypt_then_MAC); }
388
389 m_extensions.add(new Session_Ticket());
390
391 m_extensions.add(new Renegotiation_Extension(reneg_info));
392
393 m_extensions.add(new Supported_Versions(m_legacy_version, policy));
394
395 if(!client_settings.hostname().empty())
396 { m_extensions.add(new Server_Name_Indicator(client_settings.hostname())); }
397
398 if(policy.support_cert_status_message())
399 m_extensions.add(new Certificate_Status_Request({}, {}));
400
401 auto supported_groups = std::make_unique<Supported_Groups>(policy.key_exchange_groups());
402 if(!supported_groups->ec_groups().empty())
403 {
404 m_extensions.add(new Supported_Point_Formats(policy.use_ecc_point_compression()));
405 }
406 m_extensions.add(supported_groups.release());
407
408 m_extensions.add(new Signature_Algorithms(policy.acceptable_signature_schemes()));
409
410 if(reneg_info.empty() && !next_protocols.empty())
411 { m_extensions.add(new Application_Layer_Protocol_Notification(next_protocols)); }
412
414 { m_extensions.add(new SRTP_Protection_Profiles(policy.srtp_profiles())); }
415
416 cb.tls_modify_extensions(m_extensions, CLIENT);
417
418 hash.update(io.send(*this));
419 }
std::vector< uint8_t > m_random
Definition: tls_messages.h:141
Protocol_Version m_legacy_version
Definition: tls_messages.h:139
std::vector< uint16_t > m_suites
Definition: tls_messages.h:142
std::vector< std::string > next_protocols() const
void add(std::unique_ptr< Extension > extn)
std::string to_string() const
Definition: tls_version.cpp:15
std::vector< uint8_t > make_hello_random(RandomNumberGenerator &rng, Callbacks &cb, const Policy &policy)
MechanismType hash

References Botan::TLS::Policy::acceptable_protocol_version(), Botan::TLS::Policy::acceptable_signature_schemes(), Botan::TLS::Extensions::add(), Botan::TLS::Policy::ciphersuite_list(), Botan::TLS::CLIENT, hash, Botan::TLS::Client_Hello_12::Settings::hostname(), Botan::TLS::Protocol_Version::is_datagram_protocol(), Botan::TLS::Policy::key_exchange_groups(), Botan::TLS::Client_Hello::m_extensions, Botan::TLS::Client_Hello::m_legacy_version, Botan::TLS::Client_Hello::m_random, Botan::TLS::Client_Hello::m_suites, Botan::TLS::make_hello_random(), Botan::TLS::Policy::negotiate_encrypt_then_mac(), Botan::TLS::Client_Hello::next_protocols(), Botan::TLS::Client_Hello_12::Settings::protocol_version(), Botan::TLS::Handshake_IO::send(), Botan::TLS::Policy::srtp_profiles(), Botan::TLS::Policy::support_cert_status_message(), Botan::TLS::Callbacks::tls_modify_extensions(), Botan::TLS::Protocol_Version::to_string(), and Botan::TLS::Policy::use_ecc_point_compression().

◆ Client_Hello_12() [3/3]

Botan::TLS::Client_Hello_12::Client_Hello_12 ( Handshake_IO io,
Handshake_Hash hash,
const Policy policy,
Callbacks cb,
RandomNumberGenerator rng,
const std::vector< uint8_t > &  reneg_info,
const Session session,
const std::vector< std::string > &  next_protocols 
)

Definition at line 424 of file msg_client_hello.cpp.

432 {
433 m_legacy_version = session.version();
434 m_random = make_hello_random(rng, cb, policy);
435 m_session_id = session.session_id();
436 m_suites = policy.ciphersuite_list(m_legacy_version);
437
438 if(!policy.acceptable_protocol_version(session.version()))
439 throw Internal_Error("Offering " + m_legacy_version.to_string() +
440 " but our own policy does not accept it");
441
442 if(!value_exists(m_suites, session.ciphersuite_code()))
443 { m_suites.push_back(session.ciphersuite_code()); }
444
445 /*
446 * As EMS must always be used with TLS 1.2, add it even if it wasn't used
447 * in the original session. If the server understands it and follows the
448 * RFC it should reject our resume attempt and upgrade us to a new session
449 * with the EMS protection.
450 */
451 m_extensions.add(new Extended_Master_Secret);
452
453 if(session.supports_encrypt_then_mac())
454 { m_extensions.add(new Encrypt_then_MAC); }
455
456 m_extensions.add(new Session_Ticket(session.session_ticket()));
457
458 m_extensions.add(new Renegotiation_Extension(reneg_info));
459
460 m_extensions.add(new Server_Name_Indicator(session.server_info().hostname()));
461
462 if(policy.support_cert_status_message())
463 m_extensions.add(new Certificate_Status_Request({}, {}));
464
465 auto supported_groups = std::make_unique<Supported_Groups>(policy.key_exchange_groups());
466
467 if(!supported_groups->ec_groups().empty())
468 {
469 m_extensions.add(new Supported_Point_Formats(policy.use_ecc_point_compression()));
470 }
471
472 m_extensions.add(supported_groups.release());
473
474 m_extensions.add(new Signature_Algorithms(policy.acceptable_signature_schemes()));
475
476 if(reneg_info.empty() && !next_protocols.empty())
477 { m_extensions.add(new Application_Layer_Protocol_Notification(next_protocols)); }
478
479 cb.tls_modify_extensions(m_extensions, CLIENT);
480
481 hash.update(io.send(*this));
482 }
std::vector< uint8_t > m_session_id
Definition: tls_messages.h:140
bool value_exists(const std::vector< T > &vec, const T &val)
Definition: stl_util.h:89

References Botan::TLS::Policy::acceptable_protocol_version(), Botan::TLS::Policy::acceptable_signature_schemes(), Botan::TLS::Extensions::add(), Botan::TLS::Session::ciphersuite_code(), Botan::TLS::Policy::ciphersuite_list(), Botan::TLS::CLIENT, hash, Botan::TLS::Server_Information::hostname(), Botan::TLS::Policy::key_exchange_groups(), Botan::TLS::Client_Hello::m_extensions, Botan::TLS::Client_Hello::m_legacy_version, Botan::TLS::Client_Hello::m_random, Botan::TLS::Client_Hello::m_session_id, Botan::TLS::Client_Hello::m_suites, Botan::TLS::make_hello_random(), Botan::TLS::Client_Hello::next_protocols(), Botan::TLS::Handshake_IO::send(), Botan::TLS::Session::server_info(), Botan::TLS::Session::session_id(), Botan::TLS::Session::session_ticket(), Botan::TLS::Policy::support_cert_status_message(), Botan::TLS::Session::supports_encrypt_then_mac(), Botan::TLS::Callbacks::tls_modify_extensions(), Botan::TLS::Protocol_Version::to_string(), Botan::TLS::Policy::use_ecc_point_compression(), Botan::value_exists(), and Botan::TLS::Session::version().

Member Function Documentation

◆ ciphersuites()

const std::vector< uint16_t > & Botan::TLS::Client_Hello::ciphersuites ( ) const
inherited

Definition at line 148 of file msg_client_hello.cpp.

149 {
150 return m_suites;
151 }

References Botan::TLS::Client_Hello::m_suites.

◆ compression_methods()

const std::vector< uint8_t > & Botan::TLS::Client_Hello::compression_methods ( ) const

Definition at line 136 of file msg_client_hello.cpp.

144 {
145 return m_comp_methods;
146 }
std::vector< uint8_t > m_comp_methods
Definition: tls_messages.h:143

◆ cookie()

const std::vector< uint8_t > & Botan::TLS::Client_Hello::cookie ( ) const
inherited

Definition at line 329 of file msg_client_hello.cpp.

330 {
331 return m_hello_cookie;
332 }
std::vector< uint8_t > m_hello_cookie
Definition: tls_messages.h:146

References Botan::TLS::Client_Hello::m_hello_cookie.

◆ cookie_input_data()

std::vector< uint8_t > Botan::TLS::Client_Hello::cookie_input_data ( ) const
inherited

Definition at line 201 of file msg_client_hello.cpp.

202 {
203 if(m_cookie_input_bits.empty())
204 { throw Invalid_State("Client_Hello::cookie_input_data called but was not computed"); }
205
206 return m_cookie_input_bits;
207 }
std::vector< uint8_t > m_cookie_input_bits
Definition: tls_messages.h:147

References Botan::TLS::Client_Hello::m_cookie_input_bits.

◆ extension_types()

std::set< Handshake_Extension_Type > Botan::TLS::Client_Hello::extension_types ( ) const
inherited

Definition at line 153 of file msg_client_hello.cpp.

154 {
156 }
std::set< Handshake_Extension_Type > extension_types() const

References Botan::TLS::Extensions::extension_types(), and Botan::TLS::Client_Hello::m_extensions.

Referenced by Botan::TLS::Server_Hello_12::Server_Hello_12().

◆ extensions()

const Extensions & Botan::TLS::Client_Hello::extensions ( ) const
inherited

Definition at line 158 of file msg_client_hello.cpp.

159 {
160 return m_extensions;
161 }

References Botan::TLS::Client_Hello::m_extensions.

◆ legacy_version()

Protocol_Version Botan::TLS::Client_Hello::legacy_version ( ) const
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 128 of file msg_client_hello.cpp.

129 {
130 return m_legacy_version;
131 }

References Botan::TLS::Client_Hello::m_legacy_version.

◆ next_protocols()

std::vector< std::string > Botan::TLS::Client_Hello::next_protocols ( ) const
inherited

Definition at line 315 of file msg_client_hello.cpp.

316 {
317 if(auto alpn = m_extensions.get<Application_Layer_Protocol_Notification>())
318 { return alpn->protocols(); }
319 return std::vector<std::string>();
320 }

References Botan::TLS::Extensions::get(), and Botan::TLS::Client_Hello::m_extensions.

Referenced by Client_Hello_12().

◆ offered_suite()

bool Botan::TLS::Client_Hello::offered_suite ( uint16_t  ciphersuite) const
inherited

Definition at line 212 of file msg_client_hello.cpp.

213 {
214 return std::find(m_suites.cbegin(), m_suites.cend(), ciphersuite) != m_suites.cend();
215 }

References Botan::TLS::Client_Hello::m_suites.

◆ prefers_compressed_ec_points()

bool Botan::TLS::Client_Hello_12::prefers_compressed_ec_points ( ) const

Definition at line 243 of file msg_client_hello.cpp.

244 {
245 if(Supported_Point_Formats* ecc_formats = m_extensions.get<Supported_Point_Formats>())
246 {
247 return ecc_formats->prefers_compressed();
248 }
249 return false;
250 }

References Botan::TLS::Extensions::get(), and Botan::TLS::Client_Hello::m_extensions.

◆ random()

const std::vector< uint8_t > & Botan::TLS::Client_Hello::random ( ) const

Definition at line 94 of file msg_client_hello.cpp.

134 {
135 return m_random;
136 }

◆ renegotiation_info()

std::vector< uint8_t > Botan::TLS::Client_Hello_12::renegotiation_info ( ) const

Definition at line 264 of file msg_client_hello.cpp.

265 {
266 if(Renegotiation_Extension* reneg = m_extensions.get<Renegotiation_Extension>())
267 { return reneg->renegotiation_info(); }
268 return std::vector<uint8_t>();
269 }

References Botan::TLS::Extensions::get(), and Botan::TLS::Client_Hello::m_extensions.

Referenced by Botan::TLS::Channel_Impl_12::secure_renegotiation_check().

◆ secure_renegotiation()

bool Botan::TLS::Client_Hello_12::secure_renegotiation ( ) const

◆ sent_signature_algorithms()

bool Botan::TLS::Client_Hello::sent_signature_algorithms ( ) const
inherited

Definition at line 310 of file msg_client_hello.cpp.

311 {
312 return m_extensions.has<Signature_Algorithms>();
313 }

References Botan::TLS::Extensions::has(), and Botan::TLS::Client_Hello::m_extensions.

◆ serialize()

std::vector< uint8_t > Botan::TLS::Client_Hello::serialize ( ) const
overridevirtualinherited
Returns
DER representation of this message

Implements Botan::TLS::Handshake_Message.

Definition at line 174 of file msg_client_hello.cpp.

175 {
176 std::vector<uint8_t> buf;
177
178 buf.push_back(m_legacy_version.major_version());
179 buf.push_back(m_legacy_version.minor_version());
180 buf += m_random;
181
183
186
189
190 /*
191 * May not want to send extensions at all in some cases. If so,
192 * should include SCSV value (if reneg info is empty, if not we are
193 * renegotiating with a modern server)
194 */
195
197
198 return buf;
199 }
std::vector< uint8_t > serialize(Connection_Side whoami) const
uint8_t major_version() const
Definition: tls_version.h:83
uint8_t minor_version() const
Definition: tls_version.h:88
void append_tls_length_value(std::vector< uint8_t, Alloc > &buf, const T *vals, size_t vals_size, size_t tag_size)
Definition: tls_reader.h:212

References Botan::TLS::append_tls_length_value(), Botan::TLS::CLIENT, Botan::TLS::Protocol_Version::is_datagram_protocol(), Botan::TLS::Client_Hello::m_comp_methods, Botan::TLS::Client_Hello::m_extensions, Botan::TLS::Client_Hello::m_hello_cookie, Botan::TLS::Client_Hello::m_legacy_version, Botan::TLS::Client_Hello::m_random, Botan::TLS::Client_Hello::m_session_id, Botan::TLS::Client_Hello::m_suites, Botan::TLS::Protocol_Version::major_version(), Botan::TLS::Protocol_Version::minor_version(), and Botan::TLS::Extensions::serialize().

◆ session_id()

const std::vector< uint8_t > & Botan::TLS::Client_Hello::session_id ( ) const
inherited

Definition at line 138 of file msg_client_hello.cpp.

139 {
140 return m_session_id;
141 }

References Botan::TLS::Client_Hello::m_session_id.

◆ session_ticket()

std::vector< uint8_t > Botan::TLS::Client_Hello_12::session_ticket ( ) const

Definition at line 283 of file msg_client_hello.cpp.

284 {
285 if(Session_Ticket* ticket = m_extensions.get<Session_Ticket>())
286 { return ticket->contents(); }
287 return std::vector<uint8_t>();
288 }

References Botan::TLS::Extensions::get(), and Botan::TLS::Client_Hello::m_extensions.

Referenced by Botan::TLS::Handshake_State::session_ticket().

◆ signature_schemes()

std::vector< Signature_Scheme > Botan::TLS::Client_Hello::signature_schemes ( ) const
inherited

Definition at line 217 of file msg_client_hello.cpp.

218 {
219 std::vector<Signature_Scheme> schemes;
220
221 if(Signature_Algorithms* sigs = m_extensions.get<Signature_Algorithms>())
222 {
223 schemes = sigs->supported_schemes();
224 }
225
226 return schemes;
227 }

References Botan::TLS::Extensions::get(), and Botan::TLS::Client_Hello::m_extensions.

Referenced by Botan::TLS::Handshake_State::choose_sig_format().

◆ sni_hostname()

std::string Botan::TLS::Client_Hello::sni_hostname ( ) const
inherited

Definition at line 252 of file msg_client_hello.cpp.

253 {
254 if(Server_Name_Indicator* sni = m_extensions.get<Server_Name_Indicator>())
255 { return sni->host_name(); }
256 return "";
257 }

References Botan::TLS::Extensions::get(), and Botan::TLS::Client_Hello::m_extensions.

◆ srtp_profiles()

std::vector< uint16_t > Botan::TLS::Client_Hello::srtp_profiles ( ) const
inherited

Definition at line 322 of file msg_client_hello.cpp.

323 {
324 if(SRTP_Protection_Profiles* srtp = m_extensions.get<SRTP_Protection_Profiles>())
325 { return srtp->profiles(); }
326 return std::vector<uint16_t>();
327 }

References Botan::TLS::Extensions::get(), and Botan::TLS::Client_Hello::m_extensions.

Referenced by Botan::TLS::Server_Hello_12::Server_Hello_12().

◆ supported_dh_groups()

std::vector< Group_Params > Botan::TLS::Client_Hello::supported_dh_groups ( ) const
inherited

Definition at line 236 of file msg_client_hello.cpp.

237 {
238 if(Supported_Groups* groups = m_extensions.get<Supported_Groups>())
239 { return groups->dh_groups(); }
240 return std::vector<Group_Params>();
241 }

References Botan::TLS::Extensions::get(), and Botan::TLS::Client_Hello::m_extensions.

◆ supported_ecc_curves()

std::vector< Group_Params > Botan::TLS::Client_Hello::supported_ecc_curves ( ) const
inherited

Definition at line 229 of file msg_client_hello.cpp.

230 {
231 if(Supported_Groups* groups = m_extensions.get<Supported_Groups>())
232 { return groups->ec_groups(); }
233 return std::vector<Group_Params>();
234 }

References Botan::TLS::Extensions::get(), and Botan::TLS::Client_Hello::m_extensions.

◆ supported_versions()

std::vector< Protocol_Version > Botan::TLS::Client_Hello::supported_versions ( ) const
inherited

Definition at line 271 of file msg_client_hello.cpp.

272 {
273 if(Supported_Versions* versions = m_extensions.get<Supported_Versions>())
274 { return versions->versions(); }
275 return {};
276 }

References Botan::TLS::Extensions::get(), and Botan::TLS::Client_Hello::m_extensions.

◆ supports_alpn()

bool Botan::TLS::Client_Hello::supports_alpn ( ) const
inherited

Definition at line 290 of file msg_client_hello.cpp.

291 {
292 return m_extensions.has<Application_Layer_Protocol_Notification>();
293 }

References Botan::TLS::Extensions::has(), and Botan::TLS::Client_Hello::m_extensions.

Referenced by Botan::TLS::Server_Hello_12::Server_Hello_12().

◆ supports_cert_status_message()

bool Botan::TLS::Client_Hello_12::supports_cert_status_message ( ) const

Definition at line 300 of file msg_client_hello.cpp.

301 {
302 return m_extensions.has<Certificate_Status_Request>();
303 }

References Botan::TLS::Extensions::has(), and Botan::TLS::Client_Hello::m_extensions.

Referenced by Botan::TLS::Server_Hello_12::Server_Hello_12().

◆ supports_encrypt_then_mac()

bool Botan::TLS::Client_Hello_12::supports_encrypt_then_mac ( ) const

Definition at line 305 of file msg_client_hello.cpp.

306 {
307 return m_extensions.has<Encrypt_then_MAC>();
308 }

References Botan::TLS::Extensions::has(), and Botan::TLS::Client_Hello::m_extensions.

Referenced by Botan::TLS::Server_Hello_12::Server_Hello_12().

◆ supports_extended_master_secret()

bool Botan::TLS::Client_Hello_12::supports_extended_master_secret ( ) const

Definition at line 295 of file msg_client_hello.cpp.

296 {
297 return m_extensions.has<Extended_Master_Secret>();
298 }

References Botan::TLS::Extensions::has(), and Botan::TLS::Client_Hello::m_extensions.

Referenced by Botan::TLS::Server_Hello_12::Server_Hello_12().

◆ supports_session_ticket()

bool Botan::TLS::Client_Hello_12::supports_session_ticket ( ) const

Definition at line 278 of file msg_client_hello.cpp.

279 {
280 return m_extensions.has<Session_Ticket>();
281 }

References Botan::TLS::Extensions::has(), and Botan::TLS::Client_Hello::m_extensions.

Referenced by Botan::TLS::Server_Hello_12::Server_Hello_12().

◆ type()

Handshake_Type Botan::TLS::Client_Hello::type ( ) const
overridevirtualinherited
Returns
the message type

Implements Botan::TLS::Handshake_Message.

Definition at line 123 of file msg_client_hello.cpp.

124 {
125 return CLIENT_HELLO;
126 }
@ CLIENT_HELLO
Definition: tls_magic.h:65

References Botan::TLS::CLIENT_HELLO.

◆ type_string()

std::string Botan::TLS::Handshake_Message::type_string ( ) const
inherited
Returns
string representation of this message type

Definition at line 18 of file tls_handshake_state.cpp.

19 {
21 }
virtual Handshake_Type type() const =0
const char * handshake_type_to_string(Handshake_Type type)

References Botan::TLS::handshake_type_to_string(), and Botan::TLS::Handshake_Message::type().

◆ update_hello_cookie()

void Botan::TLS::Client_Hello_12::update_hello_cookie ( const Hello_Verify_Request hello_verify)

Definition at line 163 of file msg_client_hello.cpp.

164 {
166 { throw Invalid_State("Cannot use hello cookie with stream protocol"); }
167
168 m_hello_cookie = hello_verify.cookie();
169 }

References Botan::TLS::Hello_Verify_Request::cookie(), Botan::TLS::Protocol_Version::is_datagram_protocol(), Botan::TLS::Client_Hello::m_hello_cookie, and Botan::TLS::Client_Hello::m_legacy_version.

◆ wire_type()

virtual Handshake_Type Botan::TLS::Handshake_Message::wire_type ( ) const
inlinevirtualinherited
Returns
the wire representation of the message's type

Definition at line 42 of file tls_handshake_msg.h.

43 {
44 // Usually equal to the Handshake_Type enum value,
45 // with the exception of TLS 1.3 Hello Retry Request.
46 return type();
47 }

References type.

Referenced by Botan::TLS::Stream_Handshake_IO::send().

Member Data Documentation

◆ m_comp_methods

std::vector<uint8_t> Botan::TLS::Client_Hello::m_comp_methods
protectedinherited

◆ m_cookie_input_bits

std::vector<uint8_t> Botan::TLS::Client_Hello::m_cookie_input_bits
protectedinherited

◆ m_extensions

Extensions Botan::TLS::Client_Hello::m_extensions
protectedinherited

◆ m_hello_cookie

std::vector<uint8_t> Botan::TLS::Client_Hello::m_hello_cookie
protectedinherited

◆ m_legacy_version

Protocol_Version Botan::TLS::Client_Hello::m_legacy_version
protectedinherited

◆ m_random

std::vector<uint8_t> Botan::TLS::Client_Hello::m_random
protectedinherited

◆ m_session_id

std::vector<uint8_t> Botan::TLS::Client_Hello::m_session_id
protectedinherited

◆ m_suites

std::vector<uint16_t> Botan::TLS::Client_Hello::m_suites
protectedinherited

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