17.2 TLS record layer
The TLS record layer partitions data to be transmitted into TLSPlaintext
records of up to 214 bytes. The data structure of a TLS 1.3 TLSPlaintext
record is shown in Listing 17.1.
Listing 17.1: Structure of TLSPlaintext
records
enum {
invalid(0),
change_cipher_spec(20),
alert(21),
handshake(22),
application_data(23),
(255)
} ContentType;
struct {
ContentType type;
ProtocolVersion legacy_record_version;
uint16 length;
opaque fragment[TLSPlaintext.length];
} TLSPlaintext;
The legacy˙record˙version
variable denotes the record’s TLS version. As of TLS 1.3, legacy˙record˙version
is deprecated, and the only requirement in the TLS 1.3 specification is for this field to have the value 0x0303 for all records, except the initial ClientHello
, which may also...