]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg/Tls1.h: Add TLS record header length and max payload length.
authorJiaxin Wu <jiaxin.wu@intel.com>
Thu, 15 Mar 2018 10:33:54 +0000 (18:33 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Thu, 22 Mar 2018 00:24:45 +0000 (08:24 +0800)
Cc: Karunakar P <karunakarp@amiindia.co.in>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Karunakar p <karunakarp@amiindia.co.in>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
MdePkg/Include/IndustryStandard/Tls1.h

index 9009291ee333a8ee7584fdcbc8ac24da3e010a09..cccb6db7fb89993de35243bdb3ebfb4727c2d31c 100644 (file)
@@ -3,7 +3,7 @@
 \r
   This file contains common TLS 1.0/1.1/1.2 definitions from RFC 2246/4346/5246\r
 \r
-  Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>\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
@@ -87,6 +87,20 @@ typedef struct {
   UINT16                  Length;\r
 } TLS_RECORD_HEADER;\r
 \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
+//\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
+//\r
+#define TLS_CIPHERTEXT_RECORD_MAX_PAYLOAD_LENGTH   18432\r
+\r
 #pragma pack()\r
 \r
 #endif\r