Botan 3.0.0-alpha0
Crypto and TLS for C&
Public Member Functions | List of all members
Botan::TLS::Handshake_State Class Reference

#include <tls_handshake_state.h>

Inherited by Botan::TLS::Server_Handshake_State.

Public Member Functions

Callbackscallbacks () const
 
const Certificate_Request_12cert_req () const
 
void cert_req (Certificate_Request_12 *cert_req)
 
std::pair< std::string, Signature_Formatchoose_sig_format (const Private_Key &key, Signature_Scheme &scheme, bool for_client_auth, const Policy &policy) const
 
const Ciphersuiteciphersuite () const
 
const Certificate_12client_certs () const
 
void client_certs (Certificate_12 *client_certs)
 
const Finished_12client_finished () const
 
void client_finished (Finished_12 *client_finished)
 
const Client_Hello_12client_hello () const
 
void client_hello (Client_Hello_12 *client_hello)
 
const Client_Key_Exchangeclient_kex () const
 
void client_kex (Client_Key_Exchange *client_kex)
 
const Certificate_Verify_12client_verify () const
 
void client_verify (Certificate_Verify_12 *client_verify)
 
void compute_session_keys ()
 
void compute_session_keys (const secure_vector< uint8_t > &resume_master_secret)
 
void confirm_transition_to (Handshake_Type msg_type)
 
std::pair< Handshake_Type, std::vector< uint8_t > > get_next_handshake_msg ()
 
Handshake_IOhandshake_io ()
 
 Handshake_State (const Handshake_State &)=delete
 
 Handshake_State (std::unique_ptr< Handshake_IO > io, Callbacks &callbacks)
 
Handshake_Hashhash ()
 
const Handshake_Hashhash () const
 
void hello_verify_request (const Hello_Verify_Request &hello_verify)
 
const New_Session_Ticket_12new_session_ticket () const
 
void new_session_ticket (New_Session_Ticket_12 *new_session_ticket)
 
void note_message (const Handshake_Message &msg)
 
Handshake_Stateoperator= (const Handshake_State &)=delete
 
std::pair< std::string, Signature_Formatparse_sig_format (const Public_Key &key, Signature_Scheme scheme, const std::vector< Signature_Scheme > &offered_schemes, bool for_client_auth, const Policy &policy) const
 
std::unique_ptr< KDFprotocol_specific_prf () const
 
bool received_handshake_msg (Handshake_Type msg_type) const
 
const Certificate_Statusserver_cert_status () const
 
void server_cert_status (Certificate_Status *server_cert_status)
 
const Certificate_12server_certs () const
 
void server_certs (Certificate_12 *server_certs)
 
const Finished_12server_finished () const
 
void server_finished (Finished_12 *server_finished)
 
const Server_Hello_12server_hello () const
 
void server_hello (Server_Hello_12 *server_hello)
 
const Server_Hello_Doneserver_hello_done () const
 
void server_hello_done (Server_Hello_Done *server_hello_done)
 
const Server_Key_Exchangeserver_kex () const
 
void server_kex (Server_Key_Exchange *server_kex)
 
const Certificate_Verify_12server_verify () const
 
void server_verify (Certificate_Verify_12 *server_verify)
 
const Session_Keyssession_keys () const
 
std::vector< uint8_t > session_ticket () const
 
void set_expected_next (Handshake_Type msg_type)
 
void set_version (const Protocol_Version &version)
 
Protocol_Version version () const
 
virtual ~Handshake_State ()
 

Detailed Description

SSL/TLS Handshake State

This is a data holder object for all state aggregated during the handshake, both on client and server side and across protocol versions. It does not implement any logic and offers no guarantees regarding state consistency and legal TLS state transitions.

TODO: currently it implements some logic for TLS 1.2, which should be removed TODO: investigate moving the handshake_io to the channel

Definition at line 59 of file tls_handshake_state.h.

Constructor & Destructor Documentation

◆ Handshake_State() [1/2]

Botan::TLS::Handshake_State::Handshake_State ( std::unique_ptr< Handshake_IO io,
Callbacks callbacks 
)

Definition at line 98 of file tls_handshake_state.cpp.

98 :
99 m_callbacks(cb),
100 m_handshake_io(std::move(io)),
101 m_version(m_handshake_io->initial_record_version())
102 {
103 }

◆ ~Handshake_State()

Botan::TLS::Handshake_State::~Handshake_State ( )
virtualdefault

◆ Handshake_State() [2/2]

Botan::TLS::Handshake_State::Handshake_State ( const Handshake_State )
delete

Member Function Documentation

◆ callbacks()

Callbacks & Botan::TLS::Handshake_State::callbacks ( ) const
inline

◆ cert_req() [1/2]

const Certificate_Request_12 * Botan::TLS::Handshake_State::cert_req ( ) const
inline

Definition at line 147 of file tls_handshake_state.h.

148 { return m_cert_req.get(); }

Referenced by cert_req(), choose_sig_format(), and parse_sig_format().

◆ cert_req() [2/2]

void Botan::TLS::Handshake_State::cert_req ( Certificate_Request_12 cert_req)

Definition at line 159 of file tls_handshake_state.cpp.

160 {
161 m_cert_req.reset(cert_req);
162 note_message(*m_cert_req);
163 }
void note_message(const Handshake_Message &msg)
const Certificate_Request_12 * cert_req() const

References cert_req(), and note_message().

◆ choose_sig_format()

std::pair< std::string, Signature_Format > Botan::TLS::Handshake_State::choose_sig_format ( const Private_Key key,
Signature_Scheme scheme,
bool  for_client_auth,
const Policy policy 
) const

Definition at line 277 of file tls_handshake_state.cpp.

281 {
282 const std::string sig_algo = key.algo_name();
283
284 const std::vector<Signature_Scheme> allowed = policy.allowed_signature_schemes();
285
286 std::vector<Signature_Scheme> requested =
287 (for_client_auth) ? cert_req()->signature_schemes() : client_hello()->signature_schemes();
288
289 for(Signature_Scheme scheme : allowed)
290 {
291 if(!scheme.is_available())
292 {
293 continue;
294 }
295
296 if(scheme.algorithm_name() == sig_algo)
297 {
298 if(std::find(requested.begin(), requested.end(), scheme) != requested.end())
299 {
300 chosen_scheme = scheme;
301 break;
302 }
303 }
304 }
305
306 const std::string hash = chosen_scheme.hash_function_name();
307
308 if(!policy.allowed_signature_hash(hash))
309 {
310 throw TLS_Exception(Alert::HANDSHAKE_FAILURE,
311 "Policy refuses to accept signing with any hash supported by peer");
312 }
313
314 if(!chosen_scheme.format().has_value())
315 { throw Invalid_Argument(sig_algo + " is invalid/unknown for TLS signatures"); }
316
317 return std::make_pair(chosen_scheme.padding_string(), chosen_scheme.format().value());
318 }
const std::vector< Signature_Scheme > & signature_schemes() const
std::vector< Signature_Scheme > signature_schemes() const
const Client_Hello_12 * client_hello() const

References Botan::Public_Key::algo_name(), Botan::TLS::Policy::allowed_signature_hash(), Botan::TLS::Policy::allowed_signature_schemes(), cert_req(), client_hello(), Botan::TLS::Signature_Scheme::format(), Botan::TLS::Alert::HANDSHAKE_FAILURE, hash(), Botan::TLS::Signature_Scheme::hash_function_name(), Botan::TLS::Signature_Scheme::padding_string(), Botan::TLS::Client_Hello::signature_schemes(), and Botan::TLS::Certificate_Request_12::signature_schemes().

Referenced by Botan::TLS::Certificate_Verify_12::Certificate_Verify_12(), and Botan::TLS::Server_Key_Exchange::Server_Key_Exchange().

◆ ciphersuite()

const Ciphersuite & Botan::TLS::Handshake_State::ciphersuite ( ) const

Definition at line 213 of file tls_handshake_state.cpp.

214 {
215 if(!m_ciphersuite.has_value())
216 {
217 throw Invalid_State("Cipher suite is not set");
218 }
219 return m_ciphersuite.value();
220 }

Referenced by Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), protocol_specific_prf(), Botan::TLS::Server_Key_Exchange::Server_Key_Exchange(), and Botan::TLS::Session_Keys::Session_Keys().

◆ client_certs() [1/2]

const Certificate_12 * Botan::TLS::Handshake_State::client_certs ( ) const
inline

Definition at line 153 of file tls_handshake_state.h.

154 { return m_client_certs.get(); }

Referenced by client_certs().

◆ client_certs() [2/2]

void Botan::TLS::Handshake_State::client_certs ( Certificate_12 client_certs)

Definition at line 171 of file tls_handshake_state.cpp.

172 {
173 m_client_certs.reset(client_certs);
174 note_message(*m_client_certs);
175 }
const Certificate_12 * client_certs() const

References client_certs(), and note_message().

◆ client_finished() [1/2]

const Finished_12 * Botan::TLS::Handshake_State::client_finished ( ) const
inline

Definition at line 174 of file tls_handshake_state.h.

175 { return m_client_finished.get(); }

Referenced by client_finished().

◆ client_finished() [2/2]

void Botan::TLS::Handshake_State::client_finished ( Finished_12 client_finished)

Definition at line 207 of file tls_handshake_state.cpp.

208 {
209 m_client_finished.reset(client_finished);
210 note_message(*m_client_finished);
211 }
const Finished_12 * client_finished() const

References client_finished(), and note_message().

◆ client_hello() [1/2]

const Client_Hello_12 * Botan::TLS::Handshake_State::client_hello ( ) const
inline

Definition at line 135 of file tls_handshake_state.h.

136 { return m_client_hello.get(); }

Referenced by choose_sig_format(), client_hello(), and session_ticket().

◆ client_hello() [2/2]

void Botan::TLS::Handshake_State::client_hello ( Client_Hello_12 client_hello)

◆ client_kex() [1/2]

const Client_Key_Exchange * Botan::TLS::Handshake_State::client_kex ( ) const
inline

Definition at line 156 of file tls_handshake_state.h.

157 { return m_client_kex.get(); }

Referenced by client_kex(), and compute_session_keys().

◆ client_kex() [2/2]

void Botan::TLS::Handshake_State::client_kex ( Client_Key_Exchange client_kex)

Definition at line 177 of file tls_handshake_state.cpp.

178 {
179 m_client_kex.reset(client_kex);
180 note_message(*m_client_kex);
181 }
const Client_Key_Exchange * client_kex() const

References client_kex(), and note_message().

◆ client_verify() [1/2]

const Certificate_Verify_12 * Botan::TLS::Handshake_State::client_verify ( ) const
inline

Definition at line 159 of file tls_handshake_state.h.

160 { return m_client_verify.get(); }

Referenced by client_verify().

◆ client_verify() [2/2]

void Botan::TLS::Handshake_State::client_verify ( Certificate_Verify_12 client_verify)

Definition at line 183 of file tls_handshake_state.cpp.

184 {
185 m_client_verify.reset(client_verify);
186 note_message(*m_client_verify);
187 }
const Certificate_Verify_12 * client_verify() const

References client_verify(), and note_message().

◆ compute_session_keys() [1/2]

void Botan::TLS::Handshake_State::compute_session_keys ( )

Definition at line 227 of file tls_handshake_state.cpp.

228 {
229 m_session_keys = Session_Keys(this, client_kex()->pre_master_secret(), false);
230 }

References client_kex().

◆ compute_session_keys() [2/2]

void Botan::TLS::Handshake_State::compute_session_keys ( const secure_vector< uint8_t > &  resume_master_secret)

Definition at line 232 of file tls_handshake_state.cpp.

233 {
234 m_session_keys = Session_Keys(this, resume_master_secret, true);
235 }

◆ confirm_transition_to()

void Botan::TLS::Handshake_State::confirm_transition_to ( Handshake_Type  msg_type)

Confirm that we were expecting this message type

Parameters
msg_typethe message type

Definition at line 237 of file tls_handshake_state.cpp.

238 {
239 m_transitions.confirm_transition_to(handshake_msg);
240 }
void confirm_transition_to(Handshake_Type msg_type)

References Botan::TLS::Handshake_Transitions::confirm_transition_to().

◆ get_next_handshake_msg()

std::pair< Handshake_Type, std::vector< uint8_t > > Botan::TLS::Handshake_State::get_next_handshake_msg ( )

Definition at line 253 of file tls_handshake_state.cpp.

254 {
255 return m_handshake_io->get_next_record(m_transitions.change_cipher_spec_expected());
256 }

References Botan::TLS::Handshake_Transitions::change_cipher_spec_expected().

◆ handshake_io()

Handshake_IO & Botan::TLS::Handshake_State::handshake_io ( )
inline

Definition at line 68 of file tls_handshake_state.h.

68{ return *m_handshake_io; }

Referenced by hello_verify_request().

◆ hash() [1/2]

Handshake_Hash & Botan::TLS::Handshake_State::hash ( )
inline

◆ hash() [2/2]

const Handshake_Hash & Botan::TLS::Handshake_State::hash ( ) const
inline

Definition at line 189 of file tls_handshake_state.h.

189{ return m_handshake_hash; }

◆ hello_verify_request()

void Botan::TLS::Handshake_State::hello_verify_request ( const Hello_Verify_Request hello_verify)

Definition at line 110 of file tls_handshake_state.cpp.

111 {
112 note_message(hello_verify);
113
114 m_client_hello->update_hello_cookie(hello_verify);
115 hash().reset();
116 hash().update(handshake_io().send(*m_client_hello));
117 note_message(*m_client_hello);
118 }
void update(const uint8_t in[], size_t length)

References handshake_io(), hash(), note_message(), Botan::TLS::Handshake_Hash::reset(), and Botan::TLS::Handshake_Hash::update().

◆ new_session_ticket() [1/2]

const New_Session_Ticket_12 * Botan::TLS::Handshake_State::new_session_ticket ( ) const
inline

Definition at line 168 of file tls_handshake_state.h.

169 { return m_new_session_ticket.get(); }

Referenced by new_session_ticket(), and session_ticket().

◆ new_session_ticket() [2/2]

void Botan::TLS::Handshake_State::new_session_ticket ( New_Session_Ticket_12 new_session_ticket)

Definition at line 195 of file tls_handshake_state.cpp.

196 {
197 m_new_session_ticket.reset(new_session_ticket);
198 note_message(*m_new_session_ticket);
199 }
const New_Session_Ticket_12 * new_session_ticket() const

References new_session_ticket(), and note_message().

◆ note_message()

void Botan::TLS::Handshake_State::note_message ( const Handshake_Message msg)

◆ operator=()

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

◆ parse_sig_format()

std::pair< std::string, Signature_Format > Botan::TLS::Handshake_State::parse_sig_format ( const Public_Key key,
Signature_Scheme  scheme,
const std::vector< Signature_Scheme > &  offered_schemes,
bool  for_client_auth,
const Policy policy 
) const

Definition at line 343 of file tls_handshake_state.cpp.

348 {
349 const std::string key_type = key.algo_name();
350
351 if(!policy.allowed_signature_method(key_type))
352 {
353 throw TLS_Exception(Alert::HANDSHAKE_FAILURE,
354 "Rejecting " + key_type + " signature");
355 }
356
357 if(!scheme.is_available())
358 {
359 throw TLS_Exception(Alert::HANDSHAKE_FAILURE,
360 "Peer sent unknown signature scheme");
361 }
362
363 if(key_type != scheme.algorithm_name())
364 { throw Decoding_Error("Counterparty sent inconsistent key and sig types"); }
365
366 if(for_client_auth && !cert_req())
367 {
368 throw TLS_Exception(Alert::HANDSHAKE_FAILURE,
369 "No certificate verify set");
370 }
371
372 /*
373 Confirm the signature type we just received against the
374 supported_algos list that we sent; it better be there.
375 */
376
377 const std::vector<Signature_Scheme> supported_algos =
378 for_client_auth ? cert_req()->signature_schemes() :
379 offered_schemes;
380
381 const std::string hash_algo = scheme.hash_function_name();
382
383 if(!scheme.is_compatible_with(Protocol_Version::TLS_V12))
384 { throw TLS_Exception(Alert::ILLEGAL_PARAMETER, "Peer sent unexceptable signature scheme"); }
385
386 if(!supported_algos_include(supported_algos, key_type, hash_algo))
387 {
388 throw TLS_Exception(Alert::ILLEGAL_PARAMETER,
389 "TLS signature extension did not allow for " +
390 key_type + "/" + hash_algo + " signature");
391 }
392
393 if(!scheme.format().has_value())
394 { throw Invalid_Argument(key_type + " is invalid/unknown for TLS signatures"); }
395
396 return std::make_pair(scheme.padding_string(), scheme.format().value());
397 }
AlgorithmIdentifier hash_algo
Definition: x509_obj.cpp:22

References Botan::Public_Key::algo_name(), Botan::TLS::Signature_Scheme::algorithm_name(), Botan::TLS::Policy::allowed_signature_method(), cert_req(), Botan::TLS::Signature_Scheme::format(), Botan::TLS::Alert::HANDSHAKE_FAILURE, hash_algo, Botan::TLS::Signature_Scheme::hash_function_name(), Botan::TLS::Alert::ILLEGAL_PARAMETER, Botan::TLS::Signature_Scheme::is_available(), Botan::TLS::Signature_Scheme::is_compatible_with(), Botan::TLS::Signature_Scheme::padding_string(), Botan::TLS::Certificate_Request_12::signature_schemes(), and Botan::TLS::Protocol_Version::TLS_V12.

Referenced by Botan::TLS::Server_Key_Exchange::verify(), and Botan::TLS::Certificate_Verify_12::verify().

◆ protocol_specific_prf()

std::unique_ptr< KDF > Botan::TLS::Handshake_State::protocol_specific_prf ( ) const

Definition at line 266 of file tls_handshake_state.cpp.

267 {
268 const std::string prf_algo = ciphersuite().prf_algo();
269
270 if(prf_algo == "MD5" || prf_algo == "SHA-1")
271 { return KDF::create_or_throw("TLS-12-PRF(SHA-256)"); }
272
273 return KDF::create_or_throw("TLS-12-PRF(" + prf_algo + ")");
274 }
static std::unique_ptr< KDF > create_or_throw(const std::string &algo_spec, const std::string &provider="")
Definition: kdf.cpp:212
std::string prf_algo() const
const Ciphersuite & ciphersuite() const

References ciphersuite(), Botan::KDF::create_or_throw(), and Botan::TLS::Ciphersuite::prf_algo().

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

◆ received_handshake_msg()

bool Botan::TLS::Handshake_State::received_handshake_msg ( Handshake_Type  msg_type) const

Return true iff we have received a particular message already

Parameters
msg_typethe message type

Definition at line 247 of file tls_handshake_state.cpp.

248 {
249 return m_transitions.received_handshake_msg(handshake_msg);
250 }
bool received_handshake_msg(Handshake_Type msg_type) const

References Botan::TLS::Handshake_Transitions::received_handshake_msg().

◆ server_cert_status() [1/2]

const Certificate_Status * Botan::TLS::Handshake_State::server_cert_status ( ) const
inline

Definition at line 165 of file tls_handshake_state.h.

166 { return m_server_cert_status.get(); }

Referenced by server_cert_status().

◆ server_cert_status() [2/2]

void Botan::TLS::Handshake_State::server_cert_status ( Certificate_Status server_cert_status)

Definition at line 147 of file tls_handshake_state.cpp.

148 {
149 m_server_cert_status.reset(server_cert_status);
150 note_message(*m_server_cert_status);
151 }
const Certificate_Status * server_cert_status() const

References note_message(), and server_cert_status().

◆ server_certs() [1/2]

const Certificate_12 * Botan::TLS::Handshake_State::server_certs ( ) const
inline

Definition at line 141 of file tls_handshake_state.h.

142 { return m_server_certs.get(); }

Referenced by server_certs().

◆ server_certs() [2/2]

void Botan::TLS::Handshake_State::server_certs ( Certificate_12 server_certs)

Definition at line 141 of file tls_handshake_state.cpp.

142 {
143 m_server_certs.reset(server_certs);
144 note_message(*m_server_certs);
145 }
const Certificate_12 * server_certs() const

References note_message(), and server_certs().

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

◆ server_finished() [1/2]

const Finished_12 * Botan::TLS::Handshake_State::server_finished ( ) const
inline

Definition at line 171 of file tls_handshake_state.h.

172 { return m_server_finished.get(); }

Referenced by server_finished().

◆ server_finished() [2/2]

void Botan::TLS::Handshake_State::server_finished ( Finished_12 server_finished)

Definition at line 201 of file tls_handshake_state.cpp.

202 {
203 m_server_finished.reset(server_finished);
204 note_message(*m_server_finished);
205 }
const Finished_12 * server_finished() const

References note_message(), and server_finished().

◆ server_hello() [1/2]

const Server_Hello_12 * Botan::TLS::Handshake_State::server_hello ( ) const
inline

Definition at line 138 of file tls_handshake_state.h.

139 { return m_server_hello.get(); }

Referenced by server_hello().

◆ server_hello() [2/2]

void Botan::TLS::Handshake_State::server_hello ( Server_Hello_12 server_hello)

Definition at line 134 of file tls_handshake_state.cpp.

135 {
136 m_server_hello.reset(server_hello);
137 m_ciphersuite = Ciphersuite::by_id(m_server_hello->ciphersuite());
138 note_message(*m_server_hello);
139 }
static std::optional< Ciphersuite > by_id(uint16_t suite)
const Server_Hello_12 * server_hello() const

References Botan::TLS::Ciphersuite::by_id(), note_message(), and server_hello().

Referenced by Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), Botan::TLS::Server_Key_Exchange::Server_Key_Exchange(), Botan::TLS::Session_Keys::Session_Keys(), and Botan::TLS::Server_Key_Exchange::verify().

◆ server_hello_done() [1/2]

const Server_Hello_Done * Botan::TLS::Handshake_State::server_hello_done ( ) const
inline

Definition at line 150 of file tls_handshake_state.h.

151 { return m_server_hello_done.get(); }

Referenced by server_hello_done().

◆ server_hello_done() [2/2]

void Botan::TLS::Handshake_State::server_hello_done ( Server_Hello_Done server_hello_done)

Definition at line 165 of file tls_handshake_state.cpp.

166 {
167 m_server_hello_done.reset(server_hello_done);
168 note_message(*m_server_hello_done);
169 }
const Server_Hello_Done * server_hello_done() const

References note_message(), and server_hello_done().

◆ server_kex() [1/2]

const Server_Key_Exchange * Botan::TLS::Handshake_State::server_kex ( ) const
inline

Definition at line 144 of file tls_handshake_state.h.

145 { return m_server_kex.get(); }

Referenced by server_kex().

◆ server_kex() [2/2]

void Botan::TLS::Handshake_State::server_kex ( Server_Key_Exchange server_kex)

Definition at line 153 of file tls_handshake_state.cpp.

154 {
155 m_server_kex.reset(server_kex);
156 note_message(*m_server_kex);
157 }
const Server_Key_Exchange * server_kex() const

References note_message(), and server_kex().

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

◆ server_verify() [1/2]

const Certificate_Verify_12 * Botan::TLS::Handshake_State::server_verify ( ) const
inline

Definition at line 162 of file tls_handshake_state.h.

163 { return m_server_verify.get(); }

Referenced by server_verify().

◆ server_verify() [2/2]

void Botan::TLS::Handshake_State::server_verify ( Certificate_Verify_12 server_verify)

Definition at line 189 of file tls_handshake_state.cpp.

190 {
191 m_server_verify.reset(server_verify);
192 note_message(*m_server_verify);
193 }
const Certificate_Verify_12 * server_verify() const

References note_message(), and server_verify().

◆ session_keys()

const Session_Keys & Botan::TLS::Handshake_State::session_keys ( ) const
inline

Definition at line 179 of file tls_handshake_state.h.

179{ return m_session_keys; }

◆ session_ticket()

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

Definition at line 258 of file tls_handshake_state.cpp.

259 {
260 if(new_session_ticket() && !new_session_ticket()->ticket().empty())
261 { return new_session_ticket()->ticket(); }
262
263 return client_hello()->session_ticket();
264 }
std::vector< uint8_t > session_ticket() const
const std::vector< uint8_t > & ticket() const
Definition: tls_messages.h:854

References client_hello(), new_session_ticket(), Botan::TLS::Client_Hello_12::session_ticket(), and Botan::TLS::New_Session_Ticket_12::ticket().

◆ set_expected_next()

void Botan::TLS::Handshake_State::set_expected_next ( Handshake_Type  msg_type)

Record that we are expecting a particular message type next

Parameters
msg_typethe message type

Definition at line 242 of file tls_handshake_state.cpp.

243 {
244 m_transitions.set_expected_next(handshake_msg);
245 }
void set_expected_next(Handshake_Type msg_type)

References Botan::TLS::Handshake_Transitions::set_expected_next().

◆ set_version()

void Botan::TLS::Handshake_State::set_version ( const Protocol_Version version)

Definition at line 222 of file tls_handshake_state.cpp.

223 {
224 m_version = version;
225 }
Protocol_Version version() const

References version().

◆ version()

Protocol_Version Botan::TLS::Handshake_State::version ( ) const
inline

Definition at line 108 of file tls_handshake_state.h.

108{ return m_version; }

Referenced by set_version().


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