summaryrefslogtreecommitdiff
path: root/crypto/api.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-02-17 20:18:34 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2009-02-18 16:49:43 +0800
commit0e3080138a54b5b4258a3e1541f876e15ea597a7 (patch)
tree1f4cbf0f291da0cc90b3627a7b9c5dea78510df8 /crypto/api.c
parente6e047cac0a92776c654b82c63851cccf5140524 (diff)
downloadlinux-crypto-0e3080138a54b5b4258a3e1541f876e15ea597a7.tar.gz
linux-crypto-0e3080138a54b5b4258a3e1541f876e15ea597a7.zip
crypto: api - crypto_alg_mod_lookup either tested or untested
As it stands crypto_alg_mod_lookup will search either tested or untested algorithms, but never both at the same time. However, we need exactly that when constructing givcipher and aead so this patch adds support for that by setting the tested bit in type but clearing it in mask. This combination is currently unused. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/api.c')
-rw-r--r--crypto/api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/api.c b/crypto/api.c
index efe77df6..56b6e0e6 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -244,7 +244,7 @@ struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask)
struct crypto_alg *larval;
int ok;
- if (!(mask & CRYPTO_ALG_TESTED)) {
+ if (!((type | mask) & CRYPTO_ALG_TESTED)) {
type |= CRYPTO_ALG_TESTED;
mask |= CRYPTO_ALG_TESTED;
}