[CRYPTO] cryptd: Use geniv of the underlying algorithm

If the underlying algorithm specifies a specific geniv algorithm then
we should use it for the cryptd version as well.

Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
---

 crypto/cryptd.c |    3 +++
 1 files changed, 3 insertions(+)

diff --git a/crypto/cryptd.c b/crypto/cryptd.c
index 1a5c45b..f03e912 100644
--- a/crypto/cryptd.c
+++ b/crypto/cryptd.c
@@ -243,6 +243,9 @@ static struct crypto_instance *cryptd_alloc_blkcipher(
        inst->alg.cra_ablkcipher.min_keysize = alg->cra_blkcipher.min_keysize;
        inst->alg.cra_ablkcipher.max_keysize = alg->cra_blkcipher.max_keysize;
 
+       memcpy(inst->alg.cra_ablkcipher.geniv, alg->cra_blkcipher.geniv,
+              CRYPTO_MAX_ALG_NAME);
+
        inst->alg.cra_ctxsize = sizeof(struct cryptd_blkcipher_ctx);
 
        inst->alg.cra_init = cryptd_blkcipher_init_tfm;
-
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to