diff --git a/wolfcrypt/src/port/Espressif/esp32_sha.c b/wolfcrypt/src/port/Espressif/esp32_sha.c index 7a51fc6c2..257a71528 100644 --- a/wolfcrypt/src/port/Espressif/esp32_sha.c +++ b/wolfcrypt/src/port/Espressif/esp32_sha.c @@ -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 diff --git a/wolfcrypt/src/sha512.c b/wolfcrypt/src/sha512.c index b62fbc1bb..118a82bfa 100644 --- a/wolfcrypt/src/sha512.c +++ b/wolfcrypt/src/sha512.c @@ -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()