Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132696
b: refs/heads/master
c: 5852ae4
h: refs/heads/master
v: v3
  • Loading branch information
Herbert Xu committed Feb 18, 2009
1 parent 4e0e424 commit 328f80d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b170a137f467ea951c3f256da1b911545acf3ffd
refs/heads/master: 5852ae42424e3ddba2d3bdf594f72189497f17ee
16 changes: 16 additions & 0 deletions trunk/crypto/aead.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,22 @@ static struct crypto_alg *crypto_lookup_aead(const char *name, u32 type,
if (!alg->cra_aead.ivsize)
return alg;

crypto_mod_put(alg);
alg = crypto_alg_mod_lookup(name, type | CRYPTO_ALG_TESTED,
mask & ~CRYPTO_ALG_TESTED);
if (IS_ERR(alg))
return alg;

if (alg->cra_type == &crypto_aead_type) {
if ((alg->cra_flags ^ type ^ ~mask) & CRYPTO_ALG_TESTED) {
crypto_mod_put(alg);
alg = ERR_PTR(-ENOENT);
}
return alg;
}

BUG_ON(!alg->cra_aead.ivsize);

return ERR_PTR(crypto_nivaead_default(alg, type, mask));
}

Expand Down

0 comments on commit 328f80d

Please sign in to comment.