From 1aa4ecd95d8d67d21731a00646326a71295dafa3 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Sun, 17 Aug 2008 17:01:56 +1000 Subject: crypto: cryptomgr - Test ciphers using ECB As it is we only test ciphers when combined with a mode. That means users that do not invoke a mode of operations may get an untested cipher. This patch tests all ciphers using the ECB mode so that simple cipher users such as ansi-cprng are also protected. Signed-off-by: Herbert Xu --- crypto/algboss.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'crypto/algboss.c') diff --git a/crypto/algboss.c b/crypto/algboss.c index ed9f663c82c..4601e4267c8 100644 --- a/crypto/algboss.c +++ b/crypto/algboss.c @@ -210,10 +210,7 @@ static int cryptomgr_test(void *data) CRYPTO_ALG_TYPE_BLKCIPHER_MASK) && !(type & CRYPTO_ALG_GENIV)) goto skiptest; - if ((type & CRYPTO_ALG_TYPE_MASK) == CRYPTO_ALG_TYPE_CIPHER) - goto skiptest; - - err = alg_test(param->driver, param->alg, 0, CRYPTO_ALG_TESTED); + err = alg_test(param->driver, param->alg, type, CRYPTO_ALG_TESTED); skiptest: crypto_alg_tested(param->driver, err); -- cgit v1.2.3