Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Dec 2019 01:33:21 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r355872 - head/sys/sys
Message-ID:  <201912180133.xBI1XL47089237@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912180133.xBI1XL47089237>