Skip to content

Commit 1aa4ecd

Browse files
committed
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>
1 parent 73d3864 commit 1aa4ecd

2 files changed

Lines changed: 169 additions & 50 deletions

File tree

‎crypto/algboss.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,7 @@ static int cryptomgr_test(void *data)
210210
CRYPTO_ALG_TYPE_BLKCIPHER_MASK) && !(type & CRYPTO_ALG_GENIV))
211211
goto skiptest;
212212

213-
if ((type & CRYPTO_ALG_TYPE_MASK) == CRYPTO_ALG_TYPE_CIPHER)
214-
goto skiptest;
215-
216-
err = alg_test(param->driver, param->alg, 0, CRYPTO_ALG_TESTED);
213+
err = alg_test(param->driver, param->alg, type, CRYPTO_ALG_TESTED);
217214

218215
skiptest:
219216
crypto_alg_tested(param->driver, err);

0 commit comments

Comments
 (0)