Enabling any template selects CRYPTO_MANAGER, which causes
CRYPTO_MANAGER2 to enable itself, which selects every algorithm type
option. However, pulling in all algorithm types is needed only when the
self-tests are enabled. So condition the selections accordingly.
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
This patch is targeting cryptodev/master
crypto/Kconfig | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/crypto/Kconfig b/crypto/Kconfig
index e2b4106ac961..1330803628cf 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -155,18 +155,18 @@ config CRYPTO_MANAGER
This provides the support for instantiating templates such as
cbc(aes), and the support for the crypto self-tests.
config CRYPTO_MANAGER2
def_tristate CRYPTO_MANAGER || (CRYPTO_MANAGER!=n && CRYPTO_ALGAPI=y)
- select CRYPTO_ACOMP2
- select CRYPTO_AEAD2
- select CRYPTO_AKCIPHER2
- select CRYPTO_SIG2
- select CRYPTO_HASH2
- select CRYPTO_KPP2
- select CRYPTO_RNG2
- select CRYPTO_SKCIPHER2
+ select CRYPTO_ACOMP2 if CRYPTO_SELFTESTS
+ select CRYPTO_AEAD2 if CRYPTO_SELFTESTS
+ select CRYPTO_AKCIPHER2 if CRYPTO_SELFTESTS
+ select CRYPTO_SIG2 if CRYPTO_SELFTESTS
+ select CRYPTO_HASH2 if CRYPTO_SELFTESTS
+ select CRYPTO_KPP2 if CRYPTO_SELFTESTS
+ select CRYPTO_RNG2 if CRYPTO_SELFTESTS
+ select CRYPTO_SKCIPHER2 if CRYPTO_SELFTESTS
config CRYPTO_USER
tristate "Userspace cryptographic algorithm configuration"
depends on NET
select CRYPTO_MANAGER
--
2.53.0