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)
committerJakub Kicinski <kuba@kernel.org>
Fri, 16 Jun 2023 05:24:01 +0000 (22:24 -0700)
commitd113c395c67b62fc0d3f2004c0afc406aca0a2b7
tree5bfac942dcf5c6cf616536ff3dd5350a60d19003
parent372b304c1e517c4d3e5b6ca6c9cfb20f027c3b03
selftests: net: tls: check if FIPS mode is enabled

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>
tools/testing/selftests/net/tls.c