Botan  1.10.9
tls_magic.h
Go to the documentation of this file.
1 /*
2 * SSL/TLS Protocol Constants
3 * (C) 2004-2010 Jack Lloyd
4 *
5 * Released under the terms of the Botan license
6 */
7 
8 #ifndef BOTAN_TLS_PROTOCOL_MAGIC_H__
9 #define BOTAN_TLS_PROTOCOL_MAGIC_H__
10 
11 namespace Botan {
12 
13 /**
14 * Protocol Constants for SSL/TLS
15 */
17  MAX_PLAINTEXT_SIZE = 16*1024,
20 };
21 
23  NO_VERSION_SET = 0x0000,
24  SSL_V3 = 0x0300,
25  TLS_V10 = 0x0301,
26  TLS_V11 = 0x0302
27 };
28 
30 
33 
35  ALERT = 21,
36  HANDSHAKE = 22,
38 };
39 
43  CLIENT_HELLO_SSLV2 = 255, // not a wire value
46  SERVER_KEX = 12,
50  CLIENT_KEX = 16,
51  FINISHED = 20,
52 
55 };
56 
58  WARNING = 1,
59  FATAL = 2
60 };
61 
62 enum Alert_Type {
76  UNKNOWN_CA = 48,
86 
88 
89  NO_ALERT_TYPE = 0xFFFF
90 };
91 
93  RSA_CERT = 1,
94  DSS_CERT = 2,
97 };
98 
102 
109 
116 
123 
130 
137 
139 };
140 
141 /*
142 * Form of the ciphersuites broken down by field instead of
143 * being randomly assigned codepoints.
144 */
146  TLS_ALGO_SIGNER_MASK = 0xFF000000,
147  TLS_ALGO_SIGNER_ANON = 0x01000000,
148  TLS_ALGO_SIGNER_RSA = 0x02000000,
149  TLS_ALGO_SIGNER_DSA = 0x03000000,
150  TLS_ALGO_SIGNER_ECDSA = 0x04000000,
151 
152  TLS_ALGO_KEYEXCH_MASK = 0x00FF0000,
154  TLS_ALGO_KEYEXCH_RSA = 0x00020000,
155  TLS_ALGO_KEYEXCH_DH = 0x00030000,
156  TLS_ALGO_KEYEXCH_ECDH = 0x00040000,
157 
158  TLS_ALGO_MAC_MASK = 0x0000FF00,
159  TLS_ALGO_MAC_MD5 = 0x00000100,
160  TLS_ALGO_MAC_SHA1 = 0x00000200,
161  TLS_ALGO_MAC_SHA256 = 0x00000300,
162  TLS_ALGO_MAC_SHA384 = 0x00000400,
163 
164  TLS_ALGO_CIPHER_MASK = 0x000000FF,
170 };
171 
174 };
175 
182 
185 
187 
190 };
191 
192 }
193 
194 #endif
Record_Type
Definition: tls_magic.h:31
Compression_Algo
Definition: tls_magic.h:172
Handshake_Type
Definition: tls_magic.h:40
Ciphersuite_Code
Definition: tls_magic.h:99
Alert_Level
Definition: tls_magic.h:57
Connection_Side
Definition: tls_magic.h:29
Version_Code
Definition: tls_magic.h:22
TLS_Handshake_Extension_Type
Definition: tls_magic.h:176
Size_Limits
Definition: tls_magic.h:16
Alert_Type
Definition: tls_magic.h:62
Certificate_Type
Definition: tls_magic.h:92
TLS_Ciphersuite_Algos
Definition: tls_magic.h:145