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>
This commit is contained in:
Jiaxin Wu 2018-03-15 18:33:54 +08:00
parent b12b2c74a3
commit 0469ed6941
1 changed files with 15 additions and 1 deletions

View File

@ -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