提交 5f77043f 编写于 作者: H Herbert Xu 提交者: Linus Torvalds

[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: NHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 4c8bd7ee
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册