mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
crypto: arm64/sha1 - Set finalize for short finup
Always set sctx->finalize before calling finup as it may not have
been set previously on a short final.
Reported-by: Corentin LABBE <clabbe.montjoie@gmail.com>
Fixes: b97d31100e ("crypto: arm64/sha1 - Use API partial block handling")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Corentin LABBE <clabbe.montjoie@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
08094a8057
commit
432f98cf56
|
|
@ -79,8 +79,10 @@ static int sha1_ce_finup(struct shash_desc *desc, const u8 *data,
|
|||
data += len - remain;
|
||||
len = remain;
|
||||
}
|
||||
if (!finalized)
|
||||
if (!finalized) {
|
||||
sctx->finalize = 0;
|
||||
sha1_base_do_finup(desc, data, len, sha1_ce_transform);
|
||||
}
|
||||
return sha1_base_finish(desc, out);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user