summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypto/Kconfig5
-rw-r--r--crypto/algapi.c3
2 files changed, 4 insertions, 4 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig
index 50f6e285b92a..e9fee7818e27 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -149,10 +149,11 @@ config CRYPTO_HKDF
config CRYPTO_MANAGER
tristate
+ default CRYPTO_ALGAPI if CRYPTO_SELFTESTS
select CRYPTO_MANAGER2
help
- Create default cryptographic template instantiations such as
- cbc(aes).
+ 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)
diff --git a/crypto/algapi.c b/crypto/algapi.c
index 9030a30c89e8..25b5519e3b71 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -274,8 +274,7 @@ static struct crypto_larval *crypto_alloc_test_larval(struct crypto_alg *alg)
{
struct crypto_larval *larval;
- if (!IS_ENABLED(CONFIG_CRYPTO_MANAGER) ||
- !IS_ENABLED(CONFIG_CRYPTO_SELFTESTS) ||
+ if (!IS_ENABLED(CONFIG_CRYPTO_SELFTESTS) ||
(alg->cra_flags & CRYPTO_ALG_INTERNAL))
return NULL; /* No self-test needed */