diff options
author | Gal Pressman <gal@nvidia.com> | 2022-09-20 15:01:49 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-09-23 02:27:42 +0200 |
commit | 56e5a6d3aa91ed7b5b231c84180d449ce2313f61 (patch) | |
tree | df1e4ae504d02c81bb9bb83eebcf40274b127500 /net/tls/tls_device.c | |
parent | net/tls: Use cipher sizes structs (diff) | |
download | linux-56e5a6d3aa91ed7b5b231c84180d449ce2313f61.tar.xz linux-56e5a6d3aa91ed7b5b231c84180d449ce2313f61.zip |
net/tls: Support 256 bit keys with TX device offload
Add the missing clause for 256 bit keys in tls_set_device_offload(), and
the needed adjustments in tls_device_fallback.c.
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Gal Pressman <gal@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/tls/tls_device.c')
-rw-r--r-- | net/tls/tls_device.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c index 3f8121b8125c..a03d66046ca3 100644 --- a/net/tls/tls_device.c +++ b/net/tls/tls_device.c @@ -914,6 +914,7 @@ tls_device_reencrypt(struct sock *sk, struct tls_context *tls_ctx) switch (tls_ctx->crypto_recv.info.cipher_type) { case TLS_CIPHER_AES_GCM_128: + case TLS_CIPHER_AES_GCM_256: break; default: return -EINVAL; @@ -1111,6 +1112,11 @@ int tls_set_device_offload(struct sock *sk, struct tls_context *ctx) rec_seq = ((struct tls12_crypto_info_aes_gcm_128 *)crypto_info)->rec_seq; break; + case TLS_CIPHER_AES_GCM_256: + iv = ((struct tls12_crypto_info_aes_gcm_256 *)crypto_info)->iv; + rec_seq = + ((struct tls12_crypto_info_aes_gcm_256 *)crypto_info)->rec_seq; + break; default: rc = -EINVAL; goto release_netdev; |