Author: jhb Date: Wed Dec 18 01:33:20 2019 New Revision: 355872 URL: https://svnweb.freebsd.org/changeset/base/355872
Log: 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 Modified: head/sys/sys/ktls.h Modified: head/sys/sys/ktls.h ============================================================================== --- head/sys/sys/ktls.h Wed Dec 18 01:27:49 2019 (r355871) +++ head/sys/sys/ktls.h Wed Dec 18 01:33:20 2019 (r355872) @@ -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 */ @@ -66,6 +66,16 @@ struct tls_aead_data { uint8_t tls_vmajor; uint8_t tls_vminor; uint16_t tls_length; +} __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; /* _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"