Skip to content

Commit

Permalink
crypto: api - crypto_alg_mod_lookup either tested or untested
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
herbertx committed Feb 18, 2009
1 parent 049359d commit ff75330
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ff75330

Please sign in to comment.