aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/hmac.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-09-23 10:40:41 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-23 14:34:43 -0400
commit5f77043f0f7851aa6139fb9a8b297497b540b397 (patch)
tree2c9ee5c2c6219cce5fdd30ba41d35eaab6763595 /crypto/hmac.c
parent4c8bd7eeee4c8f157fb61fb64b57500990b42e0e (diff)
[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 <herbert@gondor.apana.org.au> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'crypto/hmac.c')
-rw-r--r--crypto/hmac.c2
1 files changed, 1 insertions, 1 deletions
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)
98 sg_set_buf(&tmp, ipad, bs); 98 sg_set_buf(&tmp, ipad, bs);
99 99
100 return unlikely(crypto_hash_init(&desc)) ?: 100 return unlikely(crypto_hash_init(&desc)) ?:
101 crypto_hash_update(&desc, &tmp, 1); 101 crypto_hash_update(&desc, &tmp, bs);
102} 102}
103 103
104static int hmac_update(struct hash_desc *pdesc, 104static int hmac_update(struct hash_desc *pdesc,