Botan 2.1.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 namespace Botan {
12
13 namespace TLS {
14
15 /**
16 * Protocol Constants for SSL/TLS
17 */
18 enum Size_Limits {
19 TLS_HEADER_SIZE = 5,
20 DTLS_HEADER_SIZE = TLS_HEADER_SIZE + 8,
21
22 MAX_PLAINTEXT_SIZE = 16*1024,
23 MAX_COMPRESSED_SIZE = MAX_PLAINTEXT_SIZE + 1024,
24 MAX_CIPHERTEXT_SIZE = MAX_COMPRESSED_SIZE + 1024,
25 };
26
27 enum Connection_Side { CLIENT = 1, SERVER = 2 };
28
29 enum Record_Type {
30 CHANGE_CIPHER_SPEC = 20,
31 ALERT = 21,
32 HANDSHAKE = 22,
33 APPLICATION_DATA = 23,
34
35 NO_RECORD = 256
36 };
37
38 enum Handshake_Type {
39 HELLO_REQUEST = 0,
40 CLIENT_HELLO = 1,
41 SERVER_HELLO = 2,
42 HELLO_VERIFY_REQUEST = 3,
43 NEW_SESSION_TICKET = 4, // RFC 5077
44 CERTIFICATE = 11,
45 SERVER_KEX = 12,
46 CERTIFICATE_REQUEST = 13,
47 SERVER_HELLO_DONE = 14,
48 CERTIFICATE_VERIFY = 15,
49 CLIENT_KEX = 16,
50 FINISHED = 20,
51
52 CERTIFICATE_URL = 21,
53 CERTIFICATE_STATUS = 22,
54
55 HANDSHAKE_CCS = 254, // Not a wire value
56 HANDSHAKE_NONE = 255 // Null value
57 };
58
59 const char* handshake_type_to_string(Handshake_Type t);
60
61 enum Compression_Method {
62 NO_COMPRESSION = 0x00,
63 DEFLATE_COMPRESSION = 0x01
64 };
65
66 }
67
68 }
69
70 #endif
Botan::TLS::Size_Limits
Size_Limits
Definition: tls_magic.h:18
Botan::TLS::HANDSHAKE_NONE
Definition: tls_magic.h:56
Botan::TLS::DEFLATE_COMPRESSION
Definition: tls_magic.h:63
Botan::TLS::ALERT
Definition: tls_magic.h:31
Botan::TLS::NO_COMPRESSION
Definition: tls_magic.h:62
Botan::TLS::MAX_PLAINTEXT_SIZE
Definition: tls_magic.h:22
Botan::TLS::Compression_Method
Compression_Method
Definition: tls_magic.h:61
Botan::TLS::CLIENT_KEX
Definition: tls_magic.h:49
Botan::TLS::CERTIFICATE_URL
Definition: tls_magic.h:52
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::TLS::APPLICATION_DATA
Definition: tls_magic.h:33
Botan::TLS::SERVER_HELLO
Definition: tls_magic.h:41
Botan::TLS::Connection_Side
Connection_Side
Definition: tls_magic.h:27
Botan::TLS::SERVER_HELLO_DONE
Definition: tls_magic.h:47
Botan::TLS::MAX_COMPRESSED_SIZE
Definition: tls_magic.h:23
Botan::TLS::CERTIFICATE_STATUS
Definition: tls_magic.h:53
Botan::TLS::MAX_CIPHERTEXT_SIZE
Definition: tls_magic.h:24
Botan::TLS::CLIENT
Definition: tls_magic.h:27
Botan::TLS::FINISHED
Definition: tls_magic.h:50
Botan::TLS::HELLO_REQUEST
Definition: tls_magic.h:39
Botan::TLS::DTLS_HEADER_SIZE
Definition: tls_magic.h:20
Botan::TLS::SERVER
Definition: tls_magic.h:27
Botan
Definition: alg_id.cpp:13
Botan::TLS::Record_Type
Record_Type
Definition: tls_magic.h:29
Botan::TLS::HANDSHAKE_CCS
Definition: tls_magic.h:55
Botan::TLS::CHANGE_CIPHER_SPEC
Definition: tls_magic.h:30
Botan::TLS::CERTIFICATE_REQUEST
Definition: tls_magic.h:46
Botan::TLS::NO_RECORD
Definition: tls_magic.h:35
Botan::TLS::CERTIFICATE_VERIFY
Definition: tls_magic.h:48
Botan::TLS::CLIENT_HELLO
Definition: tls_magic.h:40
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::TLS_HEADER_SIZE
Definition: tls_magic.h:19
Botan::TLS::HANDSHAKE
Definition: tls_magic.h:32
Botan::TLS::Handshake_Type
Handshake_Type
Definition: tls_magic.h:38