[CRYPTO] aead: Fix crypto_aead_setkey on geniv algorithms

We need to call the setkey function with the base pointer.

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

 include/linux/crypto.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index 4219b48..0aba104 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -778,7 +778,9 @@ static inline void crypto_aead_clear_flags(struct 
crypto_aead *tfm, u32 flags)
 static inline int crypto_aead_setkey(struct crypto_aead *tfm, const u8 *key,
                                     unsigned int keylen)
 {
-       return crypto_aead_crt(tfm)->setkey(tfm, key, keylen);
+       struct aead_tfm *crt = crypto_aead_crt(tfm);
+
+       return crt->setkey(crt->base, key, keylen);
 }
 
 int crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize);
-
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