summaryrefslogtreecommitdiffstats
path: root/net/tls/tls_main.c
diff options
context:
space:
mode:
authorVadim Fedorenko <vfedorenko@novek.ru>2020-11-24 18:24:49 +0300
committerJakub Kicinski <kuba@kernel.org>2020-11-27 14:32:37 -0800
commit74ea610602e607338d7301e0061d6b33b6b2ad0a (patch)
tree001d673c685a07a7d88825917ca37fc1cc56857e /net/tls/tls_main.c
parenta6acbe62353834dc1913d96e1ace140bc9aafca3 (diff)
downloadlinux-stable-74ea610602e607338d7301e0061d6b33b6b2ad0a.tar.gz
linux-stable-74ea610602e607338d7301e0061d6b33b6b2ad0a.tar.bz2
linux-stable-74ea610602e607338d7301e0061d6b33b6b2ad0a.zip
net/tls: add CHACHA20-POLY1305 configuration
Add ChaCha-Poly specific configuration code. Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/tls/tls_main.c')
-rw-r--r--net/tls/tls_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c
index 8d93cea99f2c..47b7c5334c34 100644
--- a/net/tls/tls_main.c
+++ b/net/tls/tls_main.c
@@ -521,6 +521,9 @@ static int do_tls_setsockopt_conf(struct sock *sk, sockptr_t optval,
case TLS_CIPHER_AES_CCM_128:
optsize = sizeof(struct tls12_crypto_info_aes_ccm_128);
break;
+ case TLS_CIPHER_CHACHA20_POLY1305:
+ optsize = sizeof(struct tls12_crypto_info_chacha20_poly1305);
+ break;
default:
rc = -EINVAL;
goto err_crypto_info;