mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
crypto: crypto4xx - Use crypto_ahash_set_reqsize
This patch makes crypto4xx use crypto_ahash_set_reqsize to avoid accessing crypto_ahash directly. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
0d6669e2ba
commit
6b1679f4a0
2 changed files with 4 additions and 2 deletions
|
@ -208,7 +208,8 @@ static int crypto4xx_hash_alg_init(struct crypto_tfm *tfm,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tfm->crt_ahash.reqsize = sizeof(struct crypto4xx_ctx);
|
crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm),
|
||||||
|
sizeof(struct crypto4xx_ctx));
|
||||||
sa = (struct dynamic_sa_ctl *) ctx->sa_in;
|
sa = (struct dynamic_sa_ctl *) ctx->sa_in;
|
||||||
set_dynamic_sa_command_0(sa, SA_SAVE_HASH, SA_NOT_SAVE_IV,
|
set_dynamic_sa_command_0(sa, SA_SAVE_HASH, SA_NOT_SAVE_IV,
|
||||||
SA_NOT_LOAD_HASH, SA_LOAD_IV_FROM_SA,
|
SA_NOT_LOAD_HASH, SA_LOAD_IV_FROM_SA,
|
||||||
|
|
|
@ -1001,7 +1001,8 @@ static int crypto4xx_alg_init(struct crypto_tfm *tfm)
|
||||||
if (alg->cra_type == &crypto_ablkcipher_type)
|
if (alg->cra_type == &crypto_ablkcipher_type)
|
||||||
tfm->crt_ablkcipher.reqsize = sizeof(struct crypto4xx_ctx);
|
tfm->crt_ablkcipher.reqsize = sizeof(struct crypto4xx_ctx);
|
||||||
else if (alg->cra_type == &crypto_ahash_type)
|
else if (alg->cra_type == &crypto_ahash_type)
|
||||||
tfm->crt_ahash.reqsize = sizeof(struct crypto4xx_ctx);
|
crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm),
|
||||||
|
sizeof(struct crypto4xx_ctx));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue