summaryrefslogtreecommitdiffstats
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
commitff753308d2f70f210ba468492cd9a01274d9d7ce (patch)
treee94719f65cfa3a52b36725b7115e4666d108d8dc /crypto/api.c
parent049359d655277c382683a6030ae0bac485568ffc (diff)
downloadlinux-ff753308d2f70f210ba468492cd9a01274d9d7ce.tar.gz
linux-ff753308d2f70f210ba468492cd9a01274d9d7ce.tar.bz2
linux-ff753308d2f70f210ba468492cd9a01274d9d7ce.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 efe77df6863f..56b6e0e66311 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;
}