提交 f6da3205 编写于 作者: H Herbert Xu

crypto: cryptd - Propagate new AEAD implementation flag

This patch allows the CRYPTO_ALG_AEAD_NEW flag to be propagated.
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 846f97df
...@@ -176,10 +176,9 @@ static inline void cryptd_check_internal(struct rtattr **tb, u32 *type, ...@@ -176,10 +176,9 @@ static inline void cryptd_check_internal(struct rtattr **tb, u32 *type,
algt = crypto_get_attr_type(tb); algt = crypto_get_attr_type(tb);
if (IS_ERR(algt)) if (IS_ERR(algt))
return; return;
if ((algt->type & CRYPTO_ALG_INTERNAL))
*type |= CRYPTO_ALG_INTERNAL; *type |= algt->type & (CRYPTO_ALG_INTERNAL | CRYPTO_ALG_AEAD_NEW);
if ((algt->mask & CRYPTO_ALG_INTERNAL)) *mask |= algt->mask & (CRYPTO_ALG_INTERNAL | CRYPTO_ALG_AEAD_NEW);
*mask |= CRYPTO_ALG_INTERNAL;
} }
static int cryptd_blkcipher_setkey(struct crypto_ablkcipher *parent, static int cryptd_blkcipher_setkey(struct crypto_ablkcipher *parent,
...@@ -806,7 +805,9 @@ static int cryptd_create_aead(struct crypto_template *tmpl, ...@@ -806,7 +805,9 @@ static int cryptd_create_aead(struct crypto_template *tmpl,
goto out_drop_aead; goto out_drop_aead;
inst->alg.base.cra_flags = CRYPTO_ALG_ASYNC | 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.base.cra_ctxsize = sizeof(struct cryptd_aead_ctx);
inst->alg.ivsize = crypto_aead_alg_ivsize(alg); inst->alg.ivsize = crypto_aead_alg_ivsize(alg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册