2 Transport Layer Security -- TLS 1.0/1.1/1.2 Standard definitions, from RFC 2246/4346/5246
4 This file contains common TLS 1.0/1.1/1.2 definitions from RFC 2246/4346/5246
6 Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22 /// TLS Cipher Suite, refers to A.5 of rfc-2246, rfc-4346 and rfc-5246.
24 #define TLS_RSA_WITH_NULL_MD5 {0x00, 0x01}
25 #define TLS_RSA_WITH_NULL_SHA {0x00, 0x02}
26 #define TLS_RSA_WITH_RC4_128_MD5 {0x00, 0x04}
27 #define TLS_RSA_WITH_RC4_128_SHA {0x00, 0x05}
28 #define TLS_RSA_WITH_IDEA_CBC_SHA {0x00, 0x07}
29 #define TLS_RSA_WITH_DES_CBC_SHA {0x00, 0x09}
30 #define TLS_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x0A}
31 #define TLS_DH_DSS_WITH_DES_CBC_SHA {0x00, 0x0C}
32 #define TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA {0x00, 0x0D}
33 #define TLS_DH_RSA_WITH_DES_CBC_SHA {0x00, 0x0F}
34 #define TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x10}
35 #define TLS_DHE_DSS_WITH_DES_CBC_SHA {0x00, 0x12}
36 #define TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA {0x00, 0x13}
37 #define TLS_DHE_RSA_WITH_DES_CBC_SHA {0x00, 0x15}
38 #define TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x16}
39 #define TLS_RSA_WITH_AES_128_CBC_SHA {0x00, 0x2F}
40 #define TLS_DH_DSS_WITH_AES_128_CBC_SHA {0x00, 0x30}
41 #define TLS_DH_RSA_WITH_AES_128_CBC_SHA {0x00, 0x31}
42 #define TLS_DHE_DSS_WITH_AES_128_CBC_SHA {0x00, 0x32}
43 #define TLS_DHE_RSA_WITH_AES_128_CBC_SHA {0x00, 0x33}
44 #define TLS_RSA_WITH_AES_256_CBC_SHA {0x00, 0x35}
45 #define TLS_DH_DSS_WITH_AES_256_CBC_SHA {0x00, 0x36}
46 #define TLS_DH_RSA_WITH_AES_256_CBC_SHA {0x00, 0x37}
47 #define TLS_DHE_DSS_WITH_AES_256_CBC_SHA {0x00, 0x38}
48 #define TLS_DHE_RSA_WITH_AES_256_CBC_SHA {0x00, 0x39}
49 #define TLS_RSA_WITH_NULL_SHA256 {0x00, 0x3B}
50 #define TLS_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x3C}
51 #define TLS_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x3D}
52 #define TLS_DH_DSS_WITH_AES_128_CBC_SHA256 {0x00, 0x3E}
53 #define TLS_DH_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x3F}
54 #define TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 {0x00, 0x40}
55 #define TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x67}
56 #define TLS_DH_DSS_WITH_AES_256_CBC_SHA256 {0x00, 0x68}
57 #define TLS_DH_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x69}
58 #define TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 {0x00, 0x6A}
59 #define TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x6B}
62 /// TLS Version, refers to A.1 of rfc-2246, rfc-4346 and rfc-5246.
64 #define TLS10_PROTOCOL_VERSION_MAJOR 0x03
65 #define TLS10_PROTOCOL_VERSION_MINOR 0x01
66 #define TLS11_PROTOCOL_VERSION_MAJOR 0x03
67 #define TLS11_PROTOCOL_VERSION_MINOR 0x02
68 #define TLS12_PROTOCOL_VERSION_MAJOR 0x03
69 #define TLS12_PROTOCOL_VERSION_MINOR 0x03
72 /// TLS Content Type, refers to A.1 of rfc-2246, rfc-4346 and rfc-5246.
75 TlsContentTypeChangeCipherSpec
= 20,
76 TlsContentTypeAlert
= 21,
77 TlsContentTypeHandshake
= 22,
78 TlsContentTypeApplicationData
= 23,
82 /// TLS Record Header, refers to A.1 of rfc-2246, rfc-4346 and rfc-5246.
86 EFI_TLS_VERSION Version
;
90 #define TLS_RECORD_HEADER_LENGTH 5
93 // The length (in bytes) of the TLSPlaintext records payload MUST NOT exceed 2^14.
94 // Refers to section 6.2 of RFC5246.
96 #define TLS_PLAINTEXT_RECORD_MAX_PAYLOAD_LENGTH 16384
99 // The length (in bytes) of the TLSCiphertext records payload MUST NOT exceed 2^14 + 2048.
100 // Refers to section 6.2 of RFC5246.
102 #define TLS_CIPHERTEXT_RECORD_MAX_PAYLOAD_LENGTH 18432