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>
This commit is contained in:
Alexander Shishkin
2010-06-03 20:53:43 +10:00
committed by Herbert Xu
parent bc94e59662
commit 0b767f9616
3 changed files with 26 additions and 0 deletions

View File

@ -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);