mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
crypto: stm32/hash - Fix hmac issue more than 256 bytes
commit 0acabecebc
upstream.
Correct condition for the second hmac loop. Key must be only
set in the first loop. Initial condition was wrong,
HMAC_KEY flag was not properly checked.
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
564262cf42
commit
12127f571c
1 changed files with 1 additions and 1 deletions
|
@ -361,7 +361,7 @@ static int stm32_hash_xmit_cpu(struct stm32_hash_dev *hdev,
|
|||
return -ETIMEDOUT;
|
||||
|
||||
if ((hdev->flags & HASH_FLAGS_HMAC) &&
|
||||
(hdev->flags & ~HASH_FLAGS_HMAC_KEY)) {
|
||||
(!(hdev->flags & HASH_FLAGS_HMAC_KEY))) {
|
||||
hdev->flags |= HASH_FLAGS_HMAC_KEY;
|
||||
stm32_hash_write_key(hdev);
|
||||
if (stm32_hash_wait_busy(hdev))
|
||||
|
|
Loading…
Reference in a new issue