aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/testmgr.c
diff options
context:
space:
mode:
authorAlexander Shishkin <virtuoso@slind.org>2010-06-03 06:53:43 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2010-06-03 06:53:43 -0400
commit0b767f96164b2b27488e3daa722ff16e89d49314 (patch)
treece87ec84059ca185aee738235bb8fca942782dd8 /crypto/testmgr.c
parentbc94e59662c13516d13e117b6edab4bec487d5a0 (diff)
crypto: testmgr - add an option to disable cryptoalgos' self-tests
By default, CONFIG_CRYPTO_MANAGER_TESTS will be enabled and thus self-tests will still run, but it is now possible to disable them to gain some time during bootup. Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/testmgr.c')
-rw-r--r--crypto/testmgr.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 5c8aaa0cb0b9..abd980c729eb 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -22,6 +22,17 @@
22#include <crypto/rng.h> 22#include <crypto/rng.h>
23 23
24#include "internal.h" 24#include "internal.h"
25
26#ifndef CONFIG_CRYPTO_MANAGER_TESTS
27
28/* a perfect nop */
29int alg_test(const char *driver, const char *alg, u32 type, u32 mask)
30{
31 return 0;
32}
33
34#else
35
25#include "testmgr.h" 36#include "testmgr.h"
26 37
27/* 38/*
@@ -2530,4 +2541,7 @@ notest:
2530non_fips_alg: 2541non_fips_alg:
2531 return -EINVAL; 2542 return -EINVAL;
2532} 2543}
2544
2545#endif /* CONFIG_CRYPTO_MANAGER_TESTS */
2546
2533EXPORT_SYMBOL_GPL(alg_test); 2547EXPORT_SYMBOL_GPL(alg_test);