diff options
author | Sabrina Dubroca <sd@queasysnail.net> | 2023-10-09 22:50:41 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-10-13 12:26:09 +0200 |
commit | 3bab3ee0f95ebd2a897ac3205b4fdee50c3b5f96 (patch) | |
tree | 5a37dd948edff566a9cdf0363caddcbc9967f55e /net/tls | |
parent | net: stmmac: fix typo in comment (diff) | |
download | linux-3bab3ee0f95ebd2a897ac3205b4fdee50c3b5f96.tar.xz linux-3bab3ee0f95ebd2a897ac3205b4fdee50c3b5f96.zip |
tls: get salt using crypto_info_salt in tls_enc_skb
I skipped this conversion in my previous series.
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls')
-rw-r--r-- | net/tls/tls_device_fallback.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/tls/tls_device_fallback.c b/net/tls/tls_device_fallback.c index 1d743f310f4f..b4a65f53d9c0 100644 --- a/net/tls/tls_device_fallback.c +++ b/net/tls/tls_device_fallback.c @@ -340,10 +340,7 @@ static struct sk_buff *tls_enc_skb(struct tls_context *tls_ctx, switch (tls_ctx->crypto_send.info.cipher_type) { case TLS_CIPHER_AES_GCM_128: - salt = tls_ctx->crypto_send.aes_gcm_128.salt; - break; case TLS_CIPHER_AES_GCM_256: - salt = tls_ctx->crypto_send.aes_gcm_256.salt; break; default: goto free_req; @@ -356,6 +353,7 @@ static struct sk_buff *tls_enc_skb(struct tls_context *tls_ctx, goto free_req; iv = buf; + salt = crypto_info_salt(&tls_ctx->crypto_send.info, cipher_desc); memcpy(iv, salt, cipher_desc->salt); aad = buf + cipher_desc->salt + cipher_desc->iv; dummy_buf = aad + TLS_AAD_SPACE_SIZE; |