mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
tls: getsockopt return record sequence number
Return the TLS record sequence number in getsockopt. Signed-off-by: Boris Pismenny <borisp@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
257082e6ae
commit
c410c1966f
1 changed files with 2 additions and 0 deletions
|
@ -311,6 +311,8 @@ static int do_tls_getsockopt_tx(struct sock *sk, char __user *optval,
|
||||||
memcpy(crypto_info_aes_gcm_128->iv,
|
memcpy(crypto_info_aes_gcm_128->iv,
|
||||||
ctx->iv + TLS_CIPHER_AES_GCM_128_SALT_SIZE,
|
ctx->iv + TLS_CIPHER_AES_GCM_128_SALT_SIZE,
|
||||||
TLS_CIPHER_AES_GCM_128_IV_SIZE);
|
TLS_CIPHER_AES_GCM_128_IV_SIZE);
|
||||||
|
memcpy(crypto_info_aes_gcm_128->rec_seq, ctx->rec_seq,
|
||||||
|
TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE);
|
||||||
release_sock(sk);
|
release_sock(sk);
|
||||||
if (copy_to_user(optval,
|
if (copy_to_user(optval,
|
||||||
crypto_info_aes_gcm_128,
|
crypto_info_aes_gcm_128,
|
||||||
|
|
Loading…
Add table
Reference in a new issue