diff options
author | Alexander Shishkin <virtuoso@slind.org> | 2010-06-03 20:53:43 +1000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2010-06-03 20:53:43 +1000 |
commit | 7d839a6c275981338fba67ce1c0fc026f7c37d6b (patch) | |
tree | e2206a069505319721e1cf36ed780e3a3127edaf /crypto/testmgr.c | |
parent | 68e954c3cc38337b1bdfb850ed2ca1720505cbf8 (diff) | |
download | linux-crypto-7d839a6c275981338fba67ce1c0fc026f7c37d6b.tar.gz linux-crypto-7d839a6c275981338fba67ce1c0fc026f7c37d6b.zip |
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 '')
-rw-r--r-- | crypto/testmgr.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 5c8aaa0c..abd980c7 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -22,6 +22,17 @@ #include <crypto/rng.h> #include "internal.h" + +#ifndef CONFIG_CRYPTO_MANAGER_TESTS + +/* a perfect nop */ +int alg_test(const char *driver, const char *alg, u32 type, u32 mask) +{ + return 0; +} + +#else + #include "testmgr.h" /* @@ -2530,4 +2541,7 @@ notest: non_fips_alg: return -EINVAL; } + +#endif /* CONFIG_CRYPTO_MANAGER_TESTS */ + EXPORT_SYMBOL_GPL(alg_test); |