aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/ktls.h
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2020-04-27 22:31:42 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2020-04-27 22:31:42 +0000
commitec1db6e13db4d5cffa7fadc42519f9bc4315eaee (patch)
tree779e1db57c6672c91ed25c2e864abfb2379922b6 /sys/sys/ktls.h
parent7840d1c45fc01dde62d6feb58e332cb71b534cc5 (diff)
downloadsrc-ec1db6e13db4d5cffa7fadc42519f9bc4315eaee.tar.gz
src-ec1db6e13db4d5cffa7fadc42519f9bc4315eaee.zip
Add the initial sequence number to the TLS enable socket option.
This will be needed for KTLS RX. Reviewed by: gallatin Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D24451
Notes
Notes: svn path=/head/; revision=360402
Diffstat (limited to 'sys/sys/ktls.h')
-rw-r--r--sys/sys/ktls.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/sys/ktls.h b/sys/sys/ktls.h
index 4790511e12c0..94d5a976274a 100644
--- a/sys/sys/ktls.h
+++ b/sys/sys/ktls.h
@@ -99,6 +99,22 @@ struct tls_mac_data {
#define TLS_MINOR_VER_THREE 4 /* 3, 4 */
/* For TCP_TXTLS_ENABLE */
+#ifdef _KERNEL
+struct tls_enable_v0 {
+ const uint8_t *cipher_key;
+ const uint8_t *iv; /* Implicit IV. */
+ const uint8_t *auth_key;
+ int cipher_algorithm; /* e.g. CRYPTO_AES_CBC */
+ int cipher_key_len;
+ int iv_len;
+ int auth_algorithm; /* e.g. CRYPTO_SHA2_256_HMAC */
+ int auth_key_len;
+ int flags;
+ uint8_t tls_vmajor;
+ uint8_t tls_vminor;
+};
+#endif
+
struct tls_enable {
const uint8_t *cipher_key;
const uint8_t *iv; /* Implicit IV. */
@@ -111,6 +127,7 @@ struct tls_enable {
int flags;
uint8_t tls_vmajor;
uint8_t tls_vminor;
+ uint8_t rec_seq[8];
};
struct tls_session_params {