summaryrefslogtreecommitdiff
path: root/crypto/algboss.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2008-08-17 17:01:56 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2008-08-29 15:49:58 +1000
commit8fc871d5b407abdb9720394863938ee9938920b8 (patch)
treea8cf85ceabfb87cea0298c18ddb4fb95e39751a7 /crypto/algboss.c
parent2f9538c8198d88d33588fdddcf67d8da38196df0 (diff)
downloadlinux-crypto-8fc871d5b407abdb9720394863938ee9938920b8.tar.gz
linux-crypto-8fc871d5b407abdb9720394863938ee9938920b8.zip
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 <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/algboss.c')
-rw-r--r--crypto/algboss.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/crypto/algboss.c b/crypto/algboss.c
index ed9f663c..4601e426 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);