From: Herbert Xu Date: Sat, 23 Sep 2006 14:40:41 +0000 (+1000) Subject: [CRYPTO] hmac: Fix hmac_init update call X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5f77043f0f7851aa6139fb9a8b297497b540b397;p=openwrt%2Fstaging%2Fblogic.git [CRYPTO] hmac: Fix hmac_init update call The crypto_hash_update call in hmac_init gave the number 1 instead of the length of the sg list in bytes. This is a missed conversion from the digest => hash change. As tcrypt only tests crypto_hash_digest it didn't catch this. Signed-off-by: Herbert Xu Signed-off-by: Linus Torvalds --- diff --git a/crypto/hmac.c b/crypto/hmac.c index f403b6946047..d52b234835cf 100644 --- a/crypto/hmac.c +++ b/crypto/hmac.c @@ -98,7 +98,7 @@ static int hmac_init(struct hash_desc *pdesc) sg_set_buf(&tmp, ipad, bs); return unlikely(crypto_hash_init(&desc)) ?: - crypto_hash_update(&desc, &tmp, 1); + crypto_hash_update(&desc, &tmp, bs); } static int hmac_update(struct hash_desc *pdesc,