Botan 2.13.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

tls_magic.h
Go to the documentation of this file.
1 /*
2 * SSL/TLS Protocol Constants
3 * (C) 2004-2010 Jack Lloyd
4 *
5 * Botan is released under the Simplified BSD License (see license.txt)
6 */
7
8 #ifndef BOTAN_TLS_PROTOCOL_MAGIC_H_
9 #define BOTAN_TLS_PROTOCOL_MAGIC_H_
10
11 #include <botan/types.h>
12
13 //BOTAN_FUTURE_INTERNAL_HEADER(tls_magic.h)
14
15 namespace Botan {
16
17 namespace TLS {
18
19 /**
20 * Protocol Constants for SSL/TLS
21 */
22 enum Size_Limits {
23 TLS_HEADER_SIZE = 5,
24 DTLS_HEADER_SIZE = TLS_HEADER_SIZE + 8,
25
26 MAX_PLAINTEXT_SIZE = 16*1024,
27 MAX_COMPRESSED_SIZE = MAX_PLAINTEXT_SIZE + 1024,
28 MAX_CIPHERTEXT_SIZE = MAX_COMPRESSED_SIZE + 1024,
29 };
30
31 // This will become an enum class in a future major release
32 enum Connection_Side { CLIENT = 1, SERVER = 2 };
33
34 // This will become an enum class in a future major release
35 enum Record_Type {
36 CHANGE_CIPHER_SPEC = 20,
37 ALERT = 21,
38 HANDSHAKE = 22,
39 APPLICATION_DATA = 23,
40
41 NO_RECORD = 256
42 };
43
44 // This will become an enum class in a future major release
45 enum Handshake_Type {
46 HELLO_REQUEST = 0,
47 CLIENT_HELLO = 1,
48 SERVER_HELLO = 2,
49 HELLO_VERIFY_REQUEST = 3,
50 NEW_SESSION_TICKET = 4, // RFC 5077
51 CERTIFICATE = 11,
52 SERVER_KEX = 12,
53 CERTIFICATE_REQUEST = 13,
54 SERVER_HELLO_DONE = 14,
55 CERTIFICATE_VERIFY = 15,
56 CLIENT_KEX = 16,
57 FINISHED = 20,
58
59 CERTIFICATE_URL = 21,
60 CERTIFICATE_STATUS = 22,
61
62 HANDSHAKE_CCS = 254, // Not a wire value
63 HANDSHAKE_NONE = 255 // Null value
64 };
65
66 const char* handshake_type_to_string(Handshake_Type t);
67
68 }
69
70 }
71
72 #endif
Botan::TLS::Size_Limits
Size_Limits
Definition: tls_magic.h:22
Botan::TLS::HANDSHAKE_NONE
Definition: tls_magic.h:63
Botan::TLS::ALERT
Definition: tls_magic.h:37
Botan::TLS::MAX_PLAINTEXT_SIZE
Definition: tls_magic.h:26
Botan::TLS::CLIENT_KEX
Definition: tls_magic.h:56
Botan::TLS::CERTIFICATE_URL
Definition: tls_magic.h:59
Botan::TLS::NEW_SESSION_TICKET
Definition: tls_magic.h:50
Botan::TLS::HELLO_VERIFY_REQUEST
Definition: tls_magic.h:49
Botan::TLS::CERTIFICATE
Definition: tls_magic.h:51
Botan::TLS::APPLICATION_DATA
Definition: tls_magic.h:39
Botan::TLS::SERVER_HELLO
Definition: tls_magic.h:48
Botan::TLS::Connection_Side
Connection_Side
Definition: tls_magic.h:32
Botan::TLS::SERVER_HELLO_DONE
Definition: tls_magic.h:54
Botan::TLS::MAX_COMPRESSED_SIZE
Definition: tls_magic.h:27
Botan::TLS::CERTIFICATE_STATUS
Definition: tls_magic.h:60
Botan::TLS::MAX_CIPHERTEXT_SIZE
Definition: tls_magic.h:28
Botan::TLS::CLIENT
Definition: tls_magic.h:32
Botan::TLS::FINISHED
Definition: tls_magic.h:57
Botan::TLS::HELLO_REQUEST
Definition: tls_magic.h:46
Botan::TLS::DTLS_HEADER_SIZE
Definition: tls_magic.h:24
Botan::TLS::SERVER
Definition: tls_magic.h:32
Botan
Definition: alg_id.cpp:13
Botan::TLS::Record_Type
Record_Type
Definition: tls_magic.h:35
Botan::TLS::HANDSHAKE_CCS
Definition: tls_magic.h:62
Botan::TLS::CHANGE_CIPHER_SPEC
Definition: tls_magic.h:36
Botan::TLS::CERTIFICATE_REQUEST
Definition: tls_magic.h:53
Botan::TLS::NO_RECORD
Definition: tls_magic.h:41
Botan::TLS::CERTIFICATE_VERIFY
Definition: tls_magic.h:55
Botan::TLS::CLIENT_HELLO
Definition: tls_magic.h:47
Botan::TLS::handshake_type_to_string
const char * handshake_type_to_string(Handshake_Type type)
Definition: tls_handshake_state.cpp:24
Botan::TLS::SERVER_KEX
Definition: tls_magic.h:52
Botan::TLS::TLS_HEADER_SIZE
Definition: tls_magic.h:23
Botan::TLS::HANDSHAKE
Definition: tls_magic.h:38
Botan::TLS::Handshake_Type
Handshake_Type
Definition: tls_magic.h:45