]> git.itanic.dy.fi Git - linux-stable/commit
selftests: net: tls: check if FIPS mode is enabled
authorMagali Lemes <magali.lemes@canonical.com>
Tue, 13 Jun 2023 12:32:20 +0000 (09:32 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jun 2023 09:12:29 +0000 (11:12 +0200)
commit6919634176cd1c8df18777bbeb1d1b934f891562
tree8f10ec9696e5b42ba47b79de036fa1585512c250
parentac5671d10060176091c38f602181144061f3be47
selftests: net: tls: check if FIPS mode is enabled

[ Upstream commit d113c395c67b62fc0d3f2004c0afc406aca0a2b7 ]

TLS selftests use the ChaCha20-Poly1305 and SM4 algorithms, which are not
FIPS compliant. When fips=1, this set of tests fails. Add a check and only
run these tests if not in FIPS mode.

Fixes: 4f336e88a870 ("selftests/tls: add CHACHA20-POLY1305 to tls selftests")
Fixes: e506342a03c7 ("selftests/tls: add SM4 GCM/CCM to tls selftests")
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/net/tls.c