Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

tls_handshake_state.cpp
Go to the documentation of this file.
1 /*
2 * TLS Handshaking
3 * (C) 2004-2006,2011,2012,2015,2016 Jack Lloyd
4 *
5 * Botan is released under the Simplified BSD License (see license.txt)
6 */
7
8 #include <botan/internal/tls_handshake_state.h>
9 #include <botan/internal/tls_record.h>
10 #include <botan/tls_messages.h>
11 #include <botan/tls_callbacks.h>
12
13 namespace Botan {
14
15 namespace TLS {
16
17 std::string Handshake_Message::type_string() const
18 {
19 return handshake_type_to_string(type());
20 }
21
22 const char* handshake_type_to_string(Handshake_Type type)
23 {
24 switch(type)
25 {
26 case HELLO_VERIFY_REQUEST:
27 return "hello_verify_request";
28
29 case HELLO_REQUEST:
30 return "hello_request";
31
32 case CLIENT_HELLO:
33 return "client_hello";
34
35 case SERVER_HELLO:
36 return "server_hello";
37
38 case CERTIFICATE:
39 return "certificate";
40
41 case CERTIFICATE_URL:
42 return "certificate_url";
43
44 case CERTIFICATE_STATUS:
45 return "certificate_status";
46
47 case SERVER_KEX:
48 return "server_key_exchange";
49
50 case CERTIFICATE_REQUEST:
51 return "certificate_request";
52
53 case SERVER_HELLO_DONE:
54 return "server_hello_done";
55
56 case CERTIFICATE_VERIFY:
57 return "certificate_verify";
58
59 case CLIENT_KEX:
60 return "client_key_exchange";
61
62 case NEW_SESSION_TICKET:
63 return "new_session_ticket";
64
65 case HANDSHAKE_CCS:
66 return "change_cipher_spec";
67
68 case FINISHED:
69 return "finished";
70
71 case HANDSHAKE_NONE:
72 return "invalid";
73 }
74
75 throw Internal_Error("Unknown TLS handshake message type " + std::to_string(type));
76 }
77
78 namespace {
79
80 uint32_t bitmask_for_handshake_type(Handshake_Type type)
81 {
82 switch(type)
83 {
84 case HELLO_VERIFY_REQUEST:
85 return (1 << 0);
86
87 case HELLO_REQUEST:
88 return (1 << 1);
89
90 case CLIENT_HELLO:
91 return (1 << 2);
92
93 case SERVER_HELLO:
94 return (1 << 3);
95
96 case CERTIFICATE:
97 return (1 << 4);
98
99 case CERTIFICATE_URL:
100 return (1 << 5);
101
102 case CERTIFICATE_STATUS:
103 return (1 << 6);
104
105 case SERVER_KEX:
106 return (1 << 7);
107
108 case CERTIFICATE_REQUEST:
109 return (1 << 8);
110
111 case SERVER_HELLO_DONE:
112 return (1 << 9);
113
114 case CERTIFICATE_VERIFY:
115 return (1 << 10);
116
117 case CLIENT_KEX:
118 return (1 << 11);
119
120 case NEW_SESSION_TICKET:
121 return (1 << 12);
122
123 case HANDSHAKE_CCS:
124 return (1 << 13);
125
126 case FINISHED:
127 return (1 << 14);
128
129 // allow explicitly disabling new handshakes
130 case HANDSHAKE_NONE:
131 return 0;
132 }
133
134 throw Internal_Error("Unknown handshake type " + std::to_string(type));
135 }
136
137 std::string handshake_mask_to_string(uint32_t mask)
138 {
139 const Handshake_Type types[] = {
140 HELLO_VERIFY_REQUEST,
141 HELLO_REQUEST,
142 CLIENT_HELLO,
143 CERTIFICATE,
144 CERTIFICATE_URL,
145 CERTIFICATE_STATUS,
146 SERVER_KEX,
147 CERTIFICATE_REQUEST,
148 SERVER_HELLO_DONE,
149 CERTIFICATE_VERIFY,
150 CLIENT_KEX,
151 NEW_SESSION_TICKET,
152 HANDSHAKE_CCS,
153 FINISHED
154 };
155
156 std::ostringstream o;
157 bool empty = true;
158
159 for(auto&& t : types)
160 {
161 if(mask & bitmask_for_handshake_type(t))
162 {
163 if(!empty)
164 o << ",";
165 o << handshake_type_to_string(t);
166 empty = false;
167 }
168 }
169
170 return o.str();
171 }
172
173 }
174
175 /*
176 * Initialize the SSL/TLS Handshake State
177 */
178 Handshake_State::Handshake_State(Handshake_IO* io, Callbacks& cb) :
179 m_callbacks(cb),
180 m_handshake_io(io),
181 m_version(m_handshake_io->initial_record_version())
182 {
183 }
184
185 void Handshake_State::note_message(const Handshake_Message& msg)
186 {
187 m_callbacks.tls_inspect_handshake_msg(msg);
188 }
189
190 void Handshake_State::hello_verify_request(const Hello_Verify_Request& hello_verify)
191 {
192 note_message(hello_verify);
193
194 m_client_hello->update_hello_cookie(hello_verify);
195 hash().reset();
196 hash().update(handshake_io().send(*m_client_hello));
197 note_message(*m_client_hello);
198 }
199
200 void Handshake_State::client_hello(Client_Hello* client_hello)
201 {
202 m_client_hello.reset(client_hello);
203 note_message(*m_client_hello);
204 }
205
206 void Handshake_State::server_hello(Server_Hello* server_hello)
207 {
208 m_server_hello.reset(server_hello);
209 m_ciphersuite = Ciphersuite::by_id(m_server_hello->ciphersuite());
210 note_message(*m_server_hello);
211 }
212
213 void Handshake_State::server_certs(Certificate* server_certs)
214 {
215 m_server_certs.reset(server_certs);
216 note_message(*m_server_certs);
217 }
218
219 void Handshake_State::server_cert_status(Certificate_Status* server_cert_status)
220 {
221 m_server_cert_status.reset(server_cert_status);
222 note_message(*m_server_cert_status);
223 }
224
225 void Handshake_State::server_kex(Server_Key_Exchange* server_kex)
226 {
227 m_server_kex.reset(server_kex);
228 note_message(*m_server_kex);
229 }
230
231 void Handshake_State::cert_req(Certificate_Req* cert_req)
232 {
233 m_cert_req.reset(cert_req);
234 note_message(*m_cert_req);
235 }
236
237 void Handshake_State::server_hello_done(Server_Hello_Done* server_hello_done)
238 {
239 m_server_hello_done.reset(server_hello_done);
240 note_message(*m_server_hello_done);
241 }
242
243 void Handshake_State::client_certs(Certificate* client_certs)
244 {
245 m_client_certs.reset(client_certs);
246 note_message(*m_client_certs);
247 }
248
249 void Handshake_State::client_kex(Client_Key_Exchange* client_kex)
250 {
251 m_client_kex.reset(client_kex);
252 note_message(*m_client_kex);
253 }
254
255 void Handshake_State::client_verify(Certificate_Verify* client_verify)
256 {
257 m_client_verify.reset(client_verify);
258 note_message(*m_client_verify);
259 }
260
261 void Handshake_State::new_session_ticket(New_Session_Ticket* new_session_ticket)
262 {
263 m_new_session_ticket.reset(new_session_ticket);
264 note_message(*m_new_session_ticket);
265 }
266
267 void Handshake_State::server_finished(Finished* server_finished)
268 {
269 m_server_finished.reset(server_finished);
270 note_message(*m_server_finished);
271 }
272
273 void Handshake_State::client_finished(Finished* client_finished)
274 {
275 m_client_finished.reset(client_finished);
276 note_message(*m_client_finished);
277 }
278
279 void Handshake_State::set_version(const Protocol_Version& version)
280 {
281 m_version = version;
282 }
283
284 void Handshake_State::compute_session_keys()
285 {
286 m_session_keys = Session_Keys(this, client_kex()->pre_master_secret(), false);
287 }
288
289 void Handshake_State::compute_session_keys(const secure_vector<uint8_t>& resume_master_secret)
290 {
291 m_session_keys = Session_Keys(this, resume_master_secret, true);
292 }
293
294 void Handshake_State::confirm_transition_to(Handshake_Type handshake_msg)
295 {
296 const uint32_t mask = bitmask_for_handshake_type(handshake_msg);
297
298 m_hand_received_mask |= mask;
299
300 const bool ok = (m_hand_expecting_mask & mask) != 0; // overlap?
301
302 if(!ok)
303 throw Unexpected_Message("Unexpected state transition in handshake, got type " +
304 std::to_string(handshake_msg) +
305 " expected " + handshake_mask_to_string(m_hand_expecting_mask) +
306 " received " + handshake_mask_to_string(m_hand_received_mask));
307
308 /* We don't know what to expect next, so force a call to
309 set_expected_next; if it doesn't happen, the next transition
310 check will always fail which is what we want.
311 */
312 m_hand_expecting_mask = 0;
313 }
314
315 void Handshake_State::set_expected_next(Handshake_Type handshake_msg)
316 {
317 m_hand_expecting_mask |= bitmask_for_handshake_type(handshake_msg);
318 }
319
320 bool Handshake_State::received_handshake_msg(Handshake_Type handshake_msg) const
321 {
322 const uint32_t mask = bitmask_for_handshake_type(handshake_msg);
323
324 return (m_hand_received_mask & mask) != 0;
325 }
326
327 std::pair<Handshake_Type, std::vector<uint8_t>>
328 Handshake_State::get_next_handshake_msg()
329 {
330 const bool expecting_ccs =
331 (bitmask_for_handshake_type(HANDSHAKE_CCS) & m_hand_expecting_mask) != 0;
332
333 return m_handshake_io->get_next_record(expecting_ccs);
334 }
335
336 std::string Handshake_State::srp_identifier() const
337 {
338 #if defined(BOTAN_HAS_SRP6)
339 // Authenticated via the successful key exchange
340 if(ciphersuite().valid() && ciphersuite().kex_algo() == "SRP_SHA")
341 return client_hello()->srp_identifier();
342 #endif
343
344 return "";
345 }
346
347
348 std::vector<uint8_t> Handshake_State::session_ticket() const
349 {
350 if(new_session_ticket() && !new_session_ticket()->ticket().empty())
351 return new_session_ticket()->ticket();
352
353 return client_hello()->session_ticket();
354 }
355
356 KDF* Handshake_State::protocol_specific_prf() const
357 {
358 if(version().supports_ciphersuite_specific_prf())
359 {
360 const std::string prf_algo = ciphersuite().prf_algo();
361
362 if(prf_algo == "MD5" || prf_algo == "SHA-1")
363 return get_kdf("TLS-12-PRF(SHA-256)");
364
365 return get_kdf("TLS-12-PRF(" + prf_algo + ")");
366 }
367
368 // Old PRF used in TLS v1.0, v1.1 and DTLS v1.0
369 return get_kdf("TLS-PRF");
370 }
371
372 namespace {
373
374 std::string choose_hash(const std::string& sig_algo,
375 Protocol_Version negotiated_version,
376 const Policy& policy,
377 bool for_client_auth,
378 const Client_Hello* client_hello,
379 const Certificate_Req* cert_req)
380 {
381 if(!negotiated_version.supports_negotiable_signature_algorithms())
382 {
383 if(sig_algo == "RSA")
384 return "Parallel(MD5,SHA-160)";
385
386 if(sig_algo == "DSA")
387 return "SHA-1";
388
389 if(sig_algo == "ECDSA")
390 return "SHA-1";
391
392 throw Internal_Error("Unknown TLS signature algo " + sig_algo);
393 }
394
395 const auto supported_algos = for_client_auth ?
396 cert_req->supported_algos() :
397 client_hello->supported_algos();
398
399 if(!supported_algos.empty())
400 {
401 const auto hashes = policy.allowed_signature_hashes();
402
403 /*
404 * Choose our most preferred hash that the counterparty supports
405 * in pairing with the signature algorithm we want to use.
406 */
407 for(auto hash : hashes)
408 {
409 for(auto algo : supported_algos)
410 {
411 if(algo.first == hash && algo.second == sig_algo)
412 return hash;
413 }
414 }
415 }
416
417 // TLS v1.2 default hash if the counterparty sent nothing
418 return "SHA-1";
419 }
420
421 }
422
423 std::pair<std::string, Signature_Format>
424 Handshake_State::choose_sig_format(const Private_Key& key,
425 std::string& hash_algo_out,
426 std::string& sig_algo_out,
427 bool for_client_auth,
428 const Policy& policy) const
429 {
430 const std::string sig_algo = key.algo_name();
431
432 const std::string hash_algo =
433 choose_hash(sig_algo,
434 this->version(),
435 policy,
436 for_client_auth,
437 client_hello(),
438 cert_req());
439
440 if(this->version().supports_negotiable_signature_algorithms())
441 {
442 hash_algo_out = hash_algo;
443 sig_algo_out = sig_algo;
444 }
445
446 if(sig_algo == "RSA")
447 {
448 const std::string padding = "EMSA3(" + hash_algo + ")";
449
450 return std::make_pair(padding, IEEE_1363);
451 }
452 else if(sig_algo == "DSA" || sig_algo == "ECDSA")
453 {
454 const std::string padding = "EMSA1(" + hash_algo + ")";
455
456 return std::make_pair(padding, DER_SEQUENCE);
457 }
458
459 throw Invalid_Argument(sig_algo + " is invalid/unknown for TLS signatures");
460 }
461
462 namespace {
463
464 bool supported_algos_include(
465 const std::vector<std::pair<std::string, std::string>>& algos,
466 const std::string& key_type,
467 const std::string& hash_type)
468 {
469 for(auto&& algo : algos)
470 {
471 if(algo.first == hash_type && algo.second == key_type)
472 {
473 return true;
474 }
475 }
476
477 return false;
478 }
479
480 }
481
482 std::pair<std::string, Signature_Format>
483 Handshake_State::parse_sig_format(const Public_Key& key,
484 const std::string& input_hash_algo,
485 const std::string& input_sig_algo,
486 bool for_client_auth,
487 const Policy& policy) const
488 {
489 const std::string key_type = key.algo_name();
490
491 if(!policy.allowed_signature_method(key_type))
492 {
493 throw TLS_Exception(Alert::HANDSHAKE_FAILURE,
494 "Rejecting " + key_type + " signature");
495 }
496
497 std::string hash_algo;
498
499 if(this->version().supports_negotiable_signature_algorithms())
500 {
501 if(input_sig_algo != key_type)
502 throw Decoding_Error("Counterparty sent inconsistent key and sig types");
503
504 if(input_hash_algo == "")
505 throw Decoding_Error("Counterparty did not send hash/sig IDS");
506
507 hash_algo = input_hash_algo;
508
509 if(for_client_auth && !cert_req())
510 {
511 throw TLS_Exception(Alert::HANDSHAKE_FAILURE,
512 "No certificate verify set");
513 }
514
515 /*
516 Confirm the signature type we just received against the
517 supported_algos list that we sent; it better be there.
518 */
519
520 const auto supported_algos =
521 for_client_auth ? cert_req()->supported_algos() :
522 client_hello()->supported_algos();
523
524 if(!supported_algos_include(supported_algos, key_type, hash_algo))
525 {
526 throw TLS_Exception(Alert::HANDSHAKE_FAILURE,
527 "TLS signature extension did not allow for " +
528 key_type + "/" + hash_algo + " signature");
529 }
530 }
531 else
532 {
533 if(input_hash_algo != "" || input_sig_algo != "")
534 throw Decoding_Error("Counterparty sent hash/sig IDs with old version");
535
536 if(key_type == "RSA")
537 {
538 hash_algo = "Parallel(MD5,SHA-160)";
539 }
540 else if(key_type == "DSA" || key_type == "ECDSA")
541 {
542 hash_algo = "SHA-1";
543 }
544 else
545 {
546 throw Invalid_Argument(key_type + " is invalid/unknown for TLS signatures");
547 }
548
549 /*
550 There is no check on the acceptability of a v1.0/v1.1 hash type,
551 since it's implicit with use of the protocol
552 */
553 }
554
555 if(key_type == "RSA")
556 {
557 const std::string padding = "EMSA3(" + hash_algo + ")";
558 return std::make_pair(padding, IEEE_1363);
559 }
560 else if(key_type == "DSA" || key_type == "ECDSA")
561 {
562 const std::string padding = "EMSA1(" + hash_algo + ")";
563 return std::make_pair(padding, DER_SEQUENCE);
564 }
565
566 throw Invalid_Argument(key_type + " is invalid/unknown for TLS signatures");
567 }
568
569 }
570
571 }
Botan::Invalid_Argument
Definition: exceptn.h:34
Botan::TLS::HANDSHAKE_NONE
Definition: tls_magic.h:56
Botan::TLS::Certificate_Req
Definition: tls_messages.h:475
Botan::TLS::Server_Hello
Definition: tls_messages.h:255
Botan::TLS::Handshake_State::parse_sig_format
std::pair< std::string, Signature_Format > parse_sig_format(const Public_Key &key, const std::string &hash_algo, const std::string &sig_algo, bool for_client_auth, const Policy &policy) const
Definition: tls_handshake_state.cpp:483
Botan::TLS::Handshake_State::server_hello_done
const Server_Hello_Done * server_hello_done() const
Definition: tls_handshake_state.h:135
Botan::TLS::Hello_Verify_Request
Definition: tls_messages.h:47
Botan::TLS::Handshake_State::client_finished
const Finished * client_finished() const
Definition: tls_handshake_state.h:156
Botan::TLS::Handshake_State::server_hello
const Server_Hello * server_hello() const
Definition: tls_handshake_state.h:123
Botan::TLS::Client_Hello::supported_algos
std::vector< std::pair< std::string, std::string > > supported_algos() const
Definition: tls_messages.h:106
Botan::Private_Key
Definition: pk_keys.h:166
Botan::TLS::Certificate_Verify
Definition: tls_messages.h:508
Botan::TLS::CLIENT_KEX
Definition: tls_magic.h:49
Botan::TLS::Handshake_State::server_finished
const Finished * server_finished() const
Definition: tls_handshake_state.h:153
Botan::TLS::Policy::allowed_signature_method
bool allowed_signature_method(const std::string &sig_method) const
Definition: tls_policy.cpp:91
Botan::TLS::CERTIFICATE_URL
Definition: tls_magic.h:52
Botan::TLS::New_Session_Ticket::ticket
const std::vector< uint8_t > & ticket() const
Definition: tls_messages.h:669
Botan::TLS::Finished
Definition: tls_messages.h:542
Botan::TLS::Handshake_Hash::reset
void reset()
Definition: tls_handshake_hash.h:36
Botan::Internal_Error
Definition: exceptn.h:88
Botan::TLS::NEW_SESSION_TICKET
Definition: tls_magic.h:43
Botan::TLS::HELLO_VERIFY_REQUEST
Definition: tls_magic.h:42
Botan::TLS::CERTIFICATE
Definition: tls_magic.h:44
Botan::Public_Key::algo_name
virtual std::string algo_name() const =0
Botan::TLS::Handshake_State::server_certs
const Certificate * server_certs() const
Definition: tls_handshake_state.h:126
Botan::ASN1::to_string
std::string to_string(const BER_Object &obj)
Definition: asn1_obj.cpp:47
Botan::TLS::Handshake_State::Handshake_State
Handshake_State(Handshake_IO *io, Callbacks &callbacks)
Definition: tls_handshake_state.cpp:178
Botan::TLS::SERVER_HELLO
Definition: tls_magic.h:41
Botan::TLS::Handshake_State::server_cert_status
const Certificate_Status * server_cert_status() const
Definition: tls_handshake_state.h:147
Botan::TLS::Protocol_Version
Definition: tls_version.h:21
type
MechanismType type
Definition: p11_mechanism.cpp:43
Botan::TLS::Server_Key_Exchange
Definition: tls_messages.h:581
Botan::TLS::Session_Keys
Definition: tls_session_key.h:22
Botan::TLS::Handshake_State::protocol_specific_prf
KDF * protocol_specific_prf() const
Definition: tls_handshake_state.cpp:356
Botan::TLS::Server_Hello_Done
Definition: tls_messages.h:649
Botan::TLS::Callbacks
Definition: tls_callbacks.h:35
Botan::TLS::SERVER_HELLO_DONE
Definition: tls_magic.h:47
Botan::TLS::Handshake_State::compute_session_keys
void compute_session_keys()
Definition: tls_handshake_state.cpp:284
Botan::TLS::Handshake_State::hash
Handshake_Hash & hash()
Definition: tls_handshake_state.h:167
Botan::TLS::Handshake_State::set_version
void set_version(const Protocol_Version &version)
Definition: tls_handshake_state.cpp:279
Botan::TLS::Handshake_State::server_kex
const Server_Key_Exchange * server_kex() const
Definition: tls_handshake_state.h:129
Botan::TLS::Ciphersuite::prf_algo
std::string prf_algo() const
Definition: tls_ciphersuite.h:90
Botan::TLS::Alert::HANDSHAKE_FAILURE
Definition: tls_alert.h:34
Botan::TLS::Client_Key_Exchange
Definition: tls_messages.h:397
Botan::secure_vector
std::vector< T, secure_allocator< T >> secure_vector
Definition: secmem.h:121
Botan::TLS::Handshake_State::get_next_handshake_msg
std::pair< Handshake_Type, std::vector< uint8_t > > get_next_handshake_msg()
Definition: tls_handshake_state.cpp:328
Botan::TLS::CERTIFICATE_STATUS
Definition: tls_magic.h:53
Botan::TLS::Handshake_State::client_verify
const Certificate_Verify * client_verify() const
Definition: tls_handshake_state.h:144
Botan::TLS::Handshake_Message
Definition: tls_handshake_msg.h:26
Botan::TLS::Handshake_Hash::update
void update(const uint8_t in[], size_t length)
Definition: tls_handshake_hash.h:25
Botan::TLS::FINISHED
Definition: tls_magic.h:50
Botan::TLS::HELLO_REQUEST
Definition: tls_magic.h:39
Botan::TLS::Policy::allowed_signature_hashes
virtual std::vector< std::string > allowed_signature_hashes() const
Definition: tls_policy.cpp:42
Botan::Decoding_Error
Definition: exceptn.h:189
Botan::TLS::Handshake_IO
Definition: tls_handshake_io.h:30
Botan
Definition: alg_id.cpp:13
Botan::TLS::Handshake_State::confirm_transition_to
void confirm_transition_to(Handshake_Type msg_type)
Definition: tls_handshake_state.cpp:294
Botan::TLS::Certificate
Definition: tls_messages.h:431
Botan::TLS::Handshake_State::session_ticket
std::vector< uint8_t > session_ticket() const
Definition: tls_handshake_state.cpp:348
resume_master_secret
secure_vector< uint8_t > resume_master_secret
Definition: tls_client.cpp:38
Botan::TLS::HANDSHAKE_CCS
Definition: tls_magic.h:55
Botan::TLS::Handshake_Message::type
virtual Handshake_Type type() const =0
Botan::Public_Key
Definition: pk_keys.h:24
Botan::IEEE_1363
Definition: pubkey.h:29
Botan::TLS::Handshake_State::note_message
void note_message(const Handshake_Message &msg)
Definition: tls_handshake_state.cpp:185
Botan::KDF
Definition: kdf.h:20
Botan::TLS::Policy
Definition: tls_policy.h:26
Botan::TLS::CERTIFICATE_REQUEST
Definition: tls_magic.h:46
Botan::TLS::Ciphersuite::by_id
static Ciphersuite by_id(uint16_t suite)
Definition: tls_ciphersuite.cpp:43
Botan::TLS::Handshake_State::handshake_io
Handshake_IO & handshake_io()
Definition: tls_handshake_state.h:57
Botan::TLS::Handshake_State::hello_verify_request
void hello_verify_request(const Hello_Verify_Request &hello_verify)
Definition: tls_handshake_state.cpp:190
Botan::TLS::Handshake_Message::type_string
std::string type_string() const
Definition: tls_handshake_state.cpp:17
Botan::TLS::New_Session_Ticket
Definition: tls_messages.h:663
Botan::TLS::CERTIFICATE_VERIFY
Definition: tls_magic.h:48
Botan::DER_SEQUENCE
Definition: pubkey.h:29
Botan::TLS::Handshake_State::srp_identifier
std::string srp_identifier() const
Definition: tls_handshake_state.cpp:336
Botan::TLS::Certificate_Req::supported_algos
std::vector< std::pair< std::string, std::string > > supported_algos() const
Definition: tls_messages.h:485
Botan::TLS::Handshake_State::choose_sig_format
std::pair< std::string, Signature_Format > choose_sig_format(const Private_Key &key, std::string &hash_algo, std::string &sig_algo, bool for_client_auth, const Policy &policy) const
Definition: tls_handshake_state.cpp:424
Botan::TLS::Callbacks::tls_inspect_handshake_msg
virtual void tls_inspect_handshake_msg(const Handshake_Message &message)
Definition: tls_callbacks.cpp:16
Botan::TLS::Handshake_State::new_session_ticket
const New_Session_Ticket * new_session_ticket() const
Definition: tls_handshake_state.h:150
Botan::TLS::Protocol_Version::supports_negotiable_signature_algorithms
bool supports_negotiable_signature_algorithms() const
Definition: tls_version.cpp:61
Botan::TLS::Handshake_State::ciphersuite
const Ciphersuite & ciphersuite() const
Definition: tls_handshake_state.h:159
Botan::TLS::Handshake_State::received_handshake_msg
bool received_handshake_msg(Handshake_Type msg_type) const
Definition: tls_handshake_state.cpp:320
Botan::TLS::CLIENT_HELLO
Definition: tls_magic.h:40
Botan::TLS::Handshake_State::client_certs
const Certificate * client_certs() const
Definition: tls_handshake_state.h:138
Botan::get_kdf
KDF * get_kdf(const std::string &algo_spec)
Definition: kdf.cpp:226
Botan::TLS::handshake_type_to_string
const char * handshake_type_to_string(Handshake_Type type)
Definition: tls_handshake_state.cpp:22
Botan::TLS::SERVER_KEX
Definition: tls_magic.h:45
Botan::TLS::Handshake_State::set_expected_next
void set_expected_next(Handshake_Type msg_type)
Definition: tls_handshake_state.cpp:315
Botan::TLS::Handshake_State::cert_req
const Certificate_Req * cert_req() const
Definition: tls_handshake_state.h:132
Botan::TLS::Certificate_Status
Definition: tls_messages.h:454
Botan::TLS::Handshake_State::version
Protocol_Version version() const
Definition: tls_handshake_state.h:100
Botan::TLS::Handshake_State::client_hello
const Client_Hello * client_hello() const
Definition: tls_handshake_state.h:120
Botan::TLS::Unexpected_Message
Definition: tls_exceptn.h:37
hash
MechanismType hash
Definition: p11_mechanism.cpp:63
Botan::TLS::Handshake_State::client_kex
const Client_Key_Exchange * client_kex() const
Definition: tls_handshake_state.h:141
Botan::TLS::TLS_Exception
Definition: tls_exceptn.h:21
Botan::TLS::Client_Hello::session_ticket
std::vector< uint8_t > session_ticket() const
Definition: tls_messages.h:170
Botan::TLS::Handshake_Type
Handshake_Type
Definition: tls_magic.h:38
Botan::TLS::Client_Hello
Definition: tls_messages.h:67