svn commit: r355872 - head/sys/sys

John Baldwin jhb at FreeBSD.org
Wed Dec 18 01:33:21 UTC 2019


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;
 
 /*


More information about the svn-src-all mailing list