This file contains common TLS 1.0/1.1/1.2 definitions from RFC 2246/4346/5246\r
\r
Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
- This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
**/\r
\r
#ifndef __TLS_1_H__\r
///\r
/// TLS Cipher Suite, refers to A.5 of rfc-2246, rfc-4346 and rfc-5246.\r
///\r
-#define TLS_RSA_WITH_NULL_MD5 {0x00, 0x01}\r
-#define TLS_RSA_WITH_NULL_SHA {0x00, 0x02}\r
-#define TLS_RSA_WITH_RC4_128_MD5 {0x00, 0x04}\r
-#define TLS_RSA_WITH_RC4_128_SHA {0x00, 0x05}\r
-#define TLS_RSA_WITH_IDEA_CBC_SHA {0x00, 0x07}\r
-#define TLS_RSA_WITH_DES_CBC_SHA {0x00, 0x09}\r
-#define TLS_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x0A}\r
-#define TLS_DH_DSS_WITH_DES_CBC_SHA {0x00, 0x0C}\r
-#define TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA {0x00, 0x0D}\r
-#define TLS_DH_RSA_WITH_DES_CBC_SHA {0x00, 0x0F}\r
-#define TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x10}\r
-#define TLS_DHE_DSS_WITH_DES_CBC_SHA {0x00, 0x12}\r
-#define TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA {0x00, 0x13}\r
-#define TLS_DHE_RSA_WITH_DES_CBC_SHA {0x00, 0x15}\r
-#define TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x16}\r
-#define TLS_RSA_WITH_AES_128_CBC_SHA {0x00, 0x2F}\r
-#define TLS_DH_DSS_WITH_AES_128_CBC_SHA {0x00, 0x30}\r
-#define TLS_DH_RSA_WITH_AES_128_CBC_SHA {0x00, 0x31}\r
-#define TLS_DHE_DSS_WITH_AES_128_CBC_SHA {0x00, 0x32}\r
-#define TLS_DHE_RSA_WITH_AES_128_CBC_SHA {0x00, 0x33}\r
-#define TLS_RSA_WITH_AES_256_CBC_SHA {0x00, 0x35}\r
-#define TLS_DH_DSS_WITH_AES_256_CBC_SHA {0x00, 0x36}\r
-#define TLS_DH_RSA_WITH_AES_256_CBC_SHA {0x00, 0x37}\r
-#define TLS_DHE_DSS_WITH_AES_256_CBC_SHA {0x00, 0x38}\r
-#define TLS_DHE_RSA_WITH_AES_256_CBC_SHA {0x00, 0x39}\r
-#define TLS_RSA_WITH_NULL_SHA256 {0x00, 0x3B}\r
-#define TLS_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x3C}\r
-#define TLS_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x3D}\r
-#define TLS_DH_DSS_WITH_AES_128_CBC_SHA256 {0x00, 0x3E}\r
-#define TLS_DH_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x3F}\r
-#define TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 {0x00, 0x40}\r
-#define TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x67}\r
-#define TLS_DH_DSS_WITH_AES_256_CBC_SHA256 {0x00, 0x68}\r
-#define TLS_DH_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x69}\r
-#define TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 {0x00, 0x6A}\r
-#define TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x6B}\r
+#define TLS_RSA_WITH_NULL_MD5 {0x00, 0x01}\r
+#define TLS_RSA_WITH_NULL_SHA {0x00, 0x02}\r
+#define TLS_RSA_WITH_RC4_128_MD5 {0x00, 0x04}\r
+#define TLS_RSA_WITH_RC4_128_SHA {0x00, 0x05}\r
+#define TLS_RSA_WITH_IDEA_CBC_SHA {0x00, 0x07}\r
+#define TLS_RSA_WITH_DES_CBC_SHA {0x00, 0x09}\r
+#define TLS_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x0A}\r
+#define TLS_DH_DSS_WITH_DES_CBC_SHA {0x00, 0x0C}\r
+#define TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA {0x00, 0x0D}\r
+#define TLS_DH_RSA_WITH_DES_CBC_SHA {0x00, 0x0F}\r
+#define TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x10}\r
+#define TLS_DHE_DSS_WITH_DES_CBC_SHA {0x00, 0x12}\r
+#define TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA {0x00, 0x13}\r
+#define TLS_DHE_RSA_WITH_DES_CBC_SHA {0x00, 0x15}\r
+#define TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x16}\r
+#define TLS_RSA_WITH_AES_128_CBC_SHA {0x00, 0x2F}\r
+#define TLS_DH_DSS_WITH_AES_128_CBC_SHA {0x00, 0x30}\r
+#define TLS_DH_RSA_WITH_AES_128_CBC_SHA {0x00, 0x31}\r
+#define TLS_DHE_DSS_WITH_AES_128_CBC_SHA {0x00, 0x32}\r
+#define TLS_DHE_RSA_WITH_AES_128_CBC_SHA {0x00, 0x33}\r
+#define TLS_RSA_WITH_AES_256_CBC_SHA {0x00, 0x35}\r
+#define TLS_DH_DSS_WITH_AES_256_CBC_SHA {0x00, 0x36}\r
+#define TLS_DH_RSA_WITH_AES_256_CBC_SHA {0x00, 0x37}\r
+#define TLS_DHE_DSS_WITH_AES_256_CBC_SHA {0x00, 0x38}\r
+#define TLS_DHE_RSA_WITH_AES_256_CBC_SHA {0x00, 0x39}\r
+#define TLS_RSA_WITH_NULL_SHA256 {0x00, 0x3B}\r
+#define TLS_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x3C}\r
+#define TLS_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x3D}\r
+#define TLS_DH_DSS_WITH_AES_128_CBC_SHA256 {0x00, 0x3E}\r
+#define TLS_DH_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x3F}\r
+#define TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 {0x00, 0x40}\r
+#define TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x67}\r
+#define TLS_DH_DSS_WITH_AES_256_CBC_SHA256 {0x00, 0x68}\r
+#define TLS_DH_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x69}\r
+#define TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 {0x00, 0x6A}\r
+#define TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x6B}\r
\r
///\r
/// TLS Version, refers to A.1 of rfc-2246, rfc-4346 and rfc-5246.\r
/// TLS Record Header, refers to A.1 of rfc-2246, rfc-4346 and rfc-5246.\r
///\r
typedef struct {\r
- UINT8 ContentType;\r
- EFI_TLS_VERSION Version;\r
- UINT16 Length;\r
+ UINT8 ContentType;\r
+ EFI_TLS_VERSION Version;\r
+ UINT16 Length;\r
} TLS_RECORD_HEADER;\r
\r
-#define TLS_RECORD_HEADER_LENGTH 5\r
+#define TLS_RECORD_HEADER_LENGTH 5\r
\r
//\r
// The length (in bytes) of the TLSPlaintext records payload MUST NOT exceed 2^14.\r
-// Refers to section 6.2 of RFC5246. \r
+// Refers to section 6.2 of RFC5246.\r
//\r
-#define TLS_PLAINTEXT_RECORD_MAX_PAYLOAD_LENGTH 16384\r
+#define TLS_PLAINTEXT_RECORD_MAX_PAYLOAD_LENGTH 16384\r
\r
//\r
// The length (in bytes) of the TLSCiphertext records payload MUST NOT exceed 2^14 + 2048.\r
-// Refers to section 6.2 of RFC5246. \r
+// Refers to section 6.2 of RFC5246.\r
//\r
-#define TLS_CIPHERTEXT_RECORD_MAX_PAYLOAD_LENGTH 18432\r
+#define TLS_CIPHERTEXT_RECORD_MAX_PAYLOAD_LENGTH 18432\r
\r
#pragma pack()\r
\r
#endif\r
-\r