Commit 02f58e5b authored by Devulapally Shiva Krishna's avatar Devulapally Shiva Krishna Committed by David S. Miller

Crypto/chcr: fix for hmac(sha) test fails

The hmac(sha) test fails for a zero length source text data.
For hmac(sha) minimum length of the data must be of block-size.
So fix this by including the data_len for the last block.
Signed-off-by: default avatarAyush Sawal <ayush.sawal@chelsio.com>
Signed-off-by: default avatarDevulapally Shiva Krishna <shiva@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ee91ac1b
......@@ -2005,7 +2005,7 @@ static int chcr_ahash_digest(struct ahash_request *req)
req_ctx->data_len += params.bfr_len + params.sg_len;
if (req->nbytes == 0) {
create_last_hash_block(req_ctx->reqbfr, bs, 0);
create_last_hash_block(req_ctx->reqbfr, bs, req_ctx->data_len);
params.more = 1;
params.bfr_len = bs;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment