diff options
author | John Baldwin <jhb@FreeBSD.org> | 2019-12-18 01:33:20 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2019-12-18 01:33:20 +0000 |
commit | dd1af20f64b03b1dd37237384ea64e5761c0d06a (patch) | |
tree | c4140058a8d2c53a97361e2cba8792729a3c81e6 /sys/sys | |
parent | f236a867020e29d16722db6b06f83295d4e4108e (diff) | |
download | src-dd1af20f64b03b1dd37237384ea64e5761c0d06a.tar.gz src-dd1af20f64b03b1dd37237384ea64e5761c0d06a.zip |
Add a structure for the AAD used in TLS 1.3.
While here, add RFC numbers to comments about nonce and AAD data
for TLS 1.2.
Reviewed by: gallatin
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D22801
Notes
Notes:
svn path=/head/; revision=355872
Diffstat (limited to 'sys/sys')
-rw-r--r-- | sys/sys/ktls.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/sys/ktls.h b/sys/sys/ktls.h index f11cd8c287ee..13a43b9beea7 100644 --- a/sys/sys/ktls.h +++ b/sys/sys/ktls.h @@ -50,7 +50,7 @@ struct tls_record_layer { #define TLS_RLTYPE_APP 23 /* - * Nonce for GCM. + * Nonce for GCM for TLS 1.2 per RFC 5288. */ struct tls_nonce_data { uint8_t fixed[TLS_AEAD_GCM_LEN]; @@ -58,7 +58,7 @@ struct tls_nonce_data { } __packed; /* - * AEAD additional data format per RFC. + * AEAD additional data format for TLS 1.2 per RFC 5246. */ struct tls_aead_data { uint64_t seq; /* In network order */ @@ -69,6 +69,16 @@ struct tls_aead_data { } __packed; /* + * AEAD additional data format for TLS 1.3 per RFC 8446. + */ +struct tls_aead_data_13 { + uint8_t type; + uint8_t tls_vmajor; + uint8_t tls_vminor; + uint16_t tls_length; +} __packed; + +/* * Stream Cipher MAC additional data input. This does not match the * exact data on the wire (the sequence number is not placed on the * wire, and any explicit IV after the record header is not covered by |