tls: get cipher_name from cipher_desc in tls_set_sw_offload
authorSabrina Dubroca <sd@queasysnail.net>
Fri, 25 Aug 2023 21:35:22 +0000 (23:35 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 28 Aug 2023 00:17:42 +0000 (17:17 -0700)
commitf3e444e31f9fa45ad59cc2d0e0c1bcc86eef4780
tree2efd76b5e4cbdddecd2a5d313fda6e6b8c21777e
parent48dfad27fd4045df82eee54186c2513cbfc54c1d
tls: get cipher_name from cipher_desc in tls_set_sw_offload

tls_cipher_desc also contains the algorithm name needed by
crypto_alloc_aead, use it.

Finally, use get_cipher_desc to check if the cipher_type coming from
userspace is valid, and remove the cipher_type switch.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://lore.kernel.org/r/53d021d80138aa125a9cef4468aa5ce531975a7b.1692977948.git.sd@queasysnail.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/tls/tls_sw.c