Botan 3.11.0
Crypto and TLS for C&
tls_magic.cpp
Go to the documentation of this file.
1/*
2* TLS Magic Values
3* (C) 2004-2006,2011,2012,2015,2016 Jack Lloyd
4* 2026 René Meusel - Rohde & Schwarz Cybersecurity
5*
6* Botan is released under the Simplified BSD License (see license.txt)
7*/
8
9#include <botan/tls_magic.h>
10
11#include <botan/tls_exceptn.h>
12
13namespace Botan::TLS {
14
16 switch(type) {
18 return "hello_verify_request";
19
21 return "hello_request";
22
24 return "client_hello";
25
27 return "server_hello";
28
30 return "hello_retry_request";
31
33 return "certificate";
34
36 return "certificate_url";
37
39 return "certificate_status";
40
42 return "server_key_exchange";
43
45 return "certificate_request";
46
48 return "server_hello_done";
49
51 return "certificate_verify";
52
54 return "client_key_exchange";
55
57 return "new_session_ticket";
58
60 return "change_cipher_spec";
61
63 return "finished";
64
66 return "end_of_early_data";
67
69 return "encrypted_extensions";
70
72 return "key_update";
73
75 return "invalid";
76 }
77
78 throw TLS_Exception(Alert::UnexpectedMessage,
79 "Unknown TLS handshake message type " + std::to_string(static_cast<size_t>(type)));
80}
81
82} // namespace Botan::TLS
const char * handshake_type_to_string(Handshake_Type type)
Definition tls_magic.cpp:15