certs: Break circular dependency when selftest is modular
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 16 Oct 2023 05:21:44 +0000 (13:21 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:59:23 +0000 (11:59 +0100)
commite71d8a3a851beb41e1694dc8e63ddc25bf29a570
tree1849d0891b4ab8e743adcaf22367e5ebd3af1796
parent1734a79e951914f1db2c65e635012a35db1c674b
certs: Break circular dependency when selftest is modular

[ Upstream commit 04a93202ed7c3b451bf22d3ff4bcd379df27f299 ]

The modular build fails because the self-test code depends on pkcs7
which in turn depends on x509 which contains the self-test.

Split the self-test out into its own module to break the cycle.

Fixes: 3cde3174eb91 ("certs: Add FIPS selftests")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
crypto/asymmetric_keys/Kconfig
crypto/asymmetric_keys/Makefile
crypto/asymmetric_keys/selftest.c
crypto/asymmetric_keys/x509_parser.h
crypto/asymmetric_keys/x509_public_key.c