ESP32 SHA384 fixes

This commit is contained in:
gojimmypi 2023-01-30 16:58:57 -08:00
parent 08538b69f3
commit 53d6e79f89
2 changed files with 2 additions and 3 deletions

View File

@ -507,8 +507,7 @@ int wc_esp_digest_state(WC_ESP32SHA* ctx, byte* hash)
#if defined(WOLFSSL_SHA384)
case SHA2_384:
SHA_LOAD_REG = SHA_384_LOAD_REG;
SHA_BUSY_REG = SHA_384_BUSY_REG;
DPORT_REG_WRITE(SHA_384_LOAD_REG, 1);
break;
#endif

View File

@ -1306,7 +1306,7 @@ static int InitSha384(wc_Sha384* sha384)
sha384->ctx.isfirstblock = 1;
if(sha384->ctx.mode == ESP32_SHA_HW) {
/* release hw */
esp_sha_hw_unlock(&(sha512->ctx));
esp_sha_hw_unlock(&(sha384->ctx));
}
/* always set mode as INIT
* whether using HW or SW is determined at first call of update()