From bdc5dd41d188354b28ad854324f63f6610c7a2e6 Mon Sep 17 00:00:00 2001 From: Hideki Miyazaki Date: Wed, 9 Jan 2019 16:56:47 +0900 Subject: [PATCH] fix no_hash_raw for esp32 hw acceleration --- src/tls.c | 2 +- wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tls.c b/src/tls.c index fd6591d08..ceaf747db 100644 --- a/src/tls.c +++ b/src/tls.c @@ -1216,7 +1216,7 @@ static int Hmac_UpdateFinal(Hmac* hmac, byte* digest, const byte* in, byte dummy[WC_MAX_BLOCK_SIZE] = {0}; int ret; word32 msgSz, blockSz, macSz, padSz, maxSz, realSz; - word32 currSz, offset; + word32 currSz, offset = 0; int msgBlocks, blocks, blockBits; int i; diff --git a/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h b/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h index 55db0ddbd..d225845d8 100644 --- a/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h +++ b/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h @@ -78,6 +78,9 @@ uint64_t wc_esp32elapsedTime(); defined(WOLFSSL_SHA512)) && \ !defined(NO_WOLFSSL_ESP32WROOM32_CRYPT_HASH) +/* RAW hash function APIs are not implemented with esp32 hardware acceleration*/ +#define WOLFSSL_NO_HASH_RAW + #include "rom/sha.h" typedef enum {