Skip to content

Commit ff75330

Browse files
committed
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>
1 parent 049359d commit ff75330

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎crypto/api.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask)
244244
struct crypto_alg *larval;
245245
int ok;
246246

247-
if (!(mask & CRYPTO_ALG_TESTED)) {
247+
if (!((type | mask) & CRYPTO_ALG_TESTED)) {
248248
type |= CRYPTO_ALG_TESTED;
249249
mask |= CRYPTO_ALG_TESTED;
250250
}

0 commit comments

Comments
 (0)