mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
net/tls: Describe ciphers sizes by const structs
Introduce cipher sizes descriptor. It helps reducing the amount of code duplications and repeated switch/cases that assigns the proper sizes according to the cipher type. Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Gal Pressman <gal@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
8db3d514e9
commit
2d2c5ea242
@@ -51,6 +51,16 @@
|
||||
|
||||
struct tls_rec;
|
||||
|
||||
struct tls_cipher_size_desc {
|
||||
unsigned int iv;
|
||||
unsigned int key;
|
||||
unsigned int salt;
|
||||
unsigned int tag;
|
||||
unsigned int rec_seq;
|
||||
};
|
||||
|
||||
extern const struct tls_cipher_size_desc tls_cipher_size_desc[];
|
||||
|
||||
/* Maximum data size carried in a TLS record */
|
||||
#define TLS_MAX_PAYLOAD_SIZE ((size_t)1 << 14)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user