[CRYPTO] cryptd: Use geniv of the underlying algorithm
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 27 Nov 2007 13:15:31 +0000 (21:15 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 10 Jan 2008 21:16:43 +0000 (08:16 +1100)
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 <herbert@gondor.apana.org.au>
crypto/cryptd.c

index 1a5c45b968520a9786f6da391c341a74751a081d..074298f2f8e392ef56391db7c2029fe07d1489c2 100644 (file)
@@ -243,6 +243,8 @@ 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;
 
+       inst->alg.cra_ablkcipher.geniv = alg->cra_blkcipher.geniv;
+
        inst->alg.cra_ctxsize = sizeof(struct cryptd_blkcipher_ctx);
 
        inst->alg.cra_init = cryptd_blkcipher_init_tfm;