added
[rrq/nfblocker.git] / src / ssl.txt
1 const unsigned char good_data_2[] = {
2     // TLS record
3     0x16, // [0] Content Type: Handshake
4     0x03, 0x01, // [1,2] Version: TLS 1.0
5     0x00, 0x6c, // [3,4] Length (use for bounds checking)
6         // Handshake
7         0x01, // [5] Handshake Type: Client Hello
8         0x00, 0x00, 0x68, // [6,7,8] Length (use for bounds checking)
9         0x03, 0x03, // [9,10] Version: TLS 1.2
10         // [11,,42] Random (32 bytes fixed length)
11         0xb6, 0xb2, 0x6a, 0xfb, 0x55, 0x5e, 0x03, 0xd5,
12         0x65, 0xa3, 0x6a, 0xf0, 0x5e, 0xa5, 0x43, 0x02,
13         0x93, 0xb9, 0x59, 0xa7, 0x54, 0xc3, 0xdd, 0x78,
14         0x57, 0x58, 0x34, 0xc5, 0x82, 0xfd, 0x53, 0xd1,
15         0x00, // [43] Session ID Length (skip past this much)
16         0x00, 0x04, // [44,45] Cipher Suites Length (skip past this much)
17             0x00, 0x01, // NULL-MD5
18             0x00, 0xff, // RENEGOTIATION INFO SCSV
19         0x01, // Compression Methods Length (skip past this much)
20             0x00, // NULL
21         0x00, 0x3b, // Extensions Length (use for bounds checking)
22             // Extension
23             0x00, 0x00, // Extension Type: Server Name (check extension type)
24             0x00, 0x0e, // Length (use for bounds checking)
25             0x00, 0x0c, // Server Name Indication Length
26                 0x00, // Server Name Type: host_name (check server name type)
27                 0x00, 0x09, // Length (length of your data)
28                 // "localhost" (data your after)
29                 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74,
30             // Extension
31             0x00, 0x0d, // Extension Type: Signature Algorithms (check extension type)
32             0x00, 0x20, // Length (skip past since this is the wrong extension)
33             // Data
34             0x00, 0x1e, 0x06, 0x01, 0x06, 0x02, 0x06, 0x03,
35             0x05, 0x01, 0x05, 0x02, 0x05, 0x03, 0x04, 0x01,
36             0x04, 0x02, 0x04, 0x03, 0x03, 0x01, 0x03, 0x02,
37             0x03, 0x03, 0x02, 0x01, 0x02, 0x02, 0x02, 0x03,
38             // Extension
39             0x00, 0x0f, // Extension Type: Heart Beat (check extension type)
40             0x00, 0x01, // Length (skip past since this is the wrong extension)
41             0x01 // Mode: Peer allows to send requests
42 };