Skip to content

Commit

Permalink
crypto: cryptd - Propagate new AEAD implementation flag
Browse files Browse the repository at this point in the history
This patch allows the CRYPTO_ALG_AEAD_NEW flag to be propagated.

Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Jul 14, 2015
1 parent 846f97d commit f6da320
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions crypto/cryptd.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,9 @@ static inline void cryptd_check_internal(struct rtattr **tb, u32 *type,
algt = crypto_get_attr_type(tb);
if (IS_ERR(algt))
return;
if ((algt->type & CRYPTO_ALG_INTERNAL))
*type |= CRYPTO_ALG_INTERNAL;
if ((algt->mask & CRYPTO_ALG_INTERNAL))
*mask |= CRYPTO_ALG_INTERNAL;

*type |= algt->type & (CRYPTO_ALG_INTERNAL | CRYPTO_ALG_AEAD_NEW);
*mask |= algt->mask & (CRYPTO_ALG_INTERNAL | CRYPTO_ALG_AEAD_NEW);
}

static int cryptd_blkcipher_setkey(struct crypto_ablkcipher *parent,
Expand Down Expand Up @@ -806,7 +805,9 @@ static int cryptd_create_aead(struct crypto_template *tmpl,
goto out_drop_aead;

inst->alg.base.cra_flags = CRYPTO_ALG_ASYNC |
(alg->base.cra_flags & CRYPTO_ALG_INTERNAL);
(alg->base.cra_flags &
(CRYPTO_ALG_INTERNAL |
CRYPTO_ALG_AEAD_NEW));
inst->alg.base.cra_ctxsize = sizeof(struct cryptd_aead_ctx);

inst->alg.ivsize = crypto_aead_alg_ivsize(alg);
Expand Down

0 comments on commit f6da320

Please sign in to comment.