diff options
author | Alexander Shishkin <virtuoso@slind.org> | 2010-06-03 20:53:43 +1000 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-04-17 16:15:35 -0400 |
commit | 17f7778809d4485ad1fecf0cf4dc1300aa853188 (patch) | |
tree | 5d0df398ae8654c0b650d26e07de806ad5426203 /crypto/testmgr.c | |
parent | 2a87e7338c6f836a88da9b1c3ca568b87df5dfa6 (diff) |
crypto: testmgr - add an option to disable cryptoalgos' self-tests
commit 0b767f96164b2b27488e3daa722ff16e89d49314 upstream.
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>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'crypto/testmgr.c')
-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 c494d7610be..73e8a46f88f 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" /* @@ -2500,4 +2511,7 @@ notest: non_fips_alg: return -EINVAL; } + +#endif /* CONFIG_CRYPTO_MANAGER_TESTS */ + EXPORT_SYMBOL_GPL(alg_test); |