From 0469ed69416a121025935df66c2217d21dde543e Mon Sep 17 00:00:00 2001 From: Jiaxin Wu Date: Thu, 15 Mar 2018 18:33:54 +0800 Subject: [PATCH] MdePkg/Tls1.h: Add TLS record header length and max payload length. Cc: Karunakar P Cc: Fu Siyuan Cc: Ye Ting Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu Reviewed-by: Karunakar p Reviewed-by: Fu Siyuan --- MdePkg/Include/IndustryStandard/Tls1.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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.
+ Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
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 -- 2.39.2