summaryrefslogtreecommitdiff
path: root/crypto/algboss.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2016-11-22 12:08:31 (GMT)
committerXie Xiaobo <xiaobo.xie@nxp.com>2017-09-25 07:25:35 (GMT)
commit48778b03281c64d8a4defd7ee061828a365f4a15 (patch)
tree30a98bf97d2e0c60a260256dd40c3df792158813 /crypto/algboss.c
parentcbab60b266ca554450a9063415a1e55158afb564 (diff)
downloadlinux-48778b03281c64d8a4defd7ee061828a365f4a15.tar.xz
crypto: testmgr - Do not test internal algorithms
Currently we manually filter out internal algorithms using a list in testmgr. This is dangerous as internal algorithms cannot be safely used even by testmgr. This patch ensures that they're never processed by testmgr at all. This patch also removes an obsolete bypass for nivciphers which no longer exist. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/algboss.c')
-rw-r--r--crypto/algboss.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/crypto/algboss.c b/crypto/algboss.c
index 6e39d9c..ccb85e1 100644
--- a/crypto/algboss.c
+++ b/crypto/algboss.c
@@ -247,12 +247,8 @@ static int cryptomgr_schedule_test(struct crypto_alg *alg)
memcpy(param->alg, alg->cra_name, sizeof(param->alg));
type = alg->cra_flags;
- /* This piece of crap needs to disappear into per-type test hooks. */
- if (!((type ^ CRYPTO_ALG_TYPE_BLKCIPHER) &
- CRYPTO_ALG_TYPE_BLKCIPHER_MASK) && !(type & CRYPTO_ALG_GENIV) &&
- ((alg->cra_flags & CRYPTO_ALG_TYPE_MASK) ==
- CRYPTO_ALG_TYPE_BLKCIPHER ? alg->cra_blkcipher.ivsize :
- alg->cra_ablkcipher.ivsize))
+ /* Do not test internal algorithms. */
+ if (type & CRYPTO_ALG_INTERNAL)
type |= CRYPTO_ALG_TESTED;
param->type = type;