summaryrefslogtreecommitdiffstats
path: root/MdePkg
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2018-03-15 18:33:54 +0800
committerJiaxin Wu <jiaxin.wu@intel.com>2018-03-22 08:24:45 +0800
commit0469ed69416a121025935df66c2217d21dde543e (patch)
tree050073abf850551a48e0ef8537a1a923f070433f /MdePkg
parentb12b2c74a3fbab681b76e33ca8d535dedf6c2b75 (diff)
downloadedk2-0469ed69416a121025935df66c2217d21dde543e.tar.gz
edk2-0469ed69416a121025935df66c2217d21dde543e.tar.bz2
edk2-0469ed69416a121025935df66c2217d21dde543e.zip
MdePkg/Tls1.h: Add TLS record header length and max payload length.
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>
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Include/IndustryStandard/Tls1.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/MdePkg/Include/IndustryStandard/Tls1.h b/MdePkg/Include/IndustryStandard/Tls1.h
index 9009291ee3..cccb6db7fb 100644
--- a/MdePkg/Include/IndustryStandard/Tls1.h
+++ b/MdePkg/Include/IndustryStandard/Tls1.h
@@ -3,7 +3,7 @@
This file contains common TLS 1.0/1.1/1.2 definitions from RFC 2246/4346/5246
- Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -87,6 +87,20 @@ typedef struct {
UINT16 Length;
} TLS_RECORD_HEADER;
+#define TLS_RECORD_HEADER_LENGTH 5
+
+//
+// The length (in bytes) of the TLSPlaintext records payload MUST NOT exceed 2^14.
+// Refers to section 6.2 of RFC5246.
+//
+#define TLS_PLAINTEXT_RECORD_MAX_PAYLOAD_LENGTH 16384
+
+//
+// The length (in bytes) of the TLSCiphertext records payload MUST NOT exceed 2^14 + 2048.
+// Refers to section 6.2 of RFC5246.
+//
+#define TLS_CIPHERTEXT_RECORD_MAX_PAYLOAD_LENGTH 18432
+
#pragma pack()
#endif