mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 19:54:40 +02:00
Fix for STM32 Hashing status bit checking logic. ZD 19783. The digest calculation was indicating "not busy" before digest result (DCIS) was finished. This did not show up on most systems because the computation is usually done by the time it reads.
This commit is contained in:
@@ -258,14 +258,14 @@ static int wc_Stm32_Hash_WaitDone(STM32_HASH_Context* stmCtx)
|
|||||||
(void)stmCtx;
|
(void)stmCtx;
|
||||||
|
|
||||||
/* wait until not busy and hash digest / input block are complete */
|
/* wait until not busy and hash digest / input block are complete */
|
||||||
while ((HASH->SR & HASH_SR_BUSY) &&
|
while (((HASH->SR & HASH_SR_BUSY)
|
||||||
#ifdef HASH_IMR_DCIE
|
#ifdef HASH_IMR_DCIE
|
||||||
(HASH->SR & HASH_SR_DCIS) == 0 &&
|
|| (HASH->SR & HASH_SR_DCIS) == 0
|
||||||
#endif
|
#endif
|
||||||
#ifdef HASH_IMR_DINIE
|
#ifdef HASH_IMR_DINIE
|
||||||
(HASH->SR & HASH_SR_DINIS) == 0 &&
|
|| (HASH->SR & HASH_SR_DINIS) == 0
|
||||||
#endif
|
#endif
|
||||||
++timeout < STM32_HASH_TIMEOUT) {
|
) && ++timeout < STM32_HASH_TIMEOUT) {
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef DEBUG_STM32_HASH
|
#ifdef DEBUG_STM32_HASH
|
||||||
|
Reference in New Issue
Block a user