Skip to content

Commit e4c9a73

Browse files
authored
Merge pull request #6587 from gojimmypi/ESP32WROOM-refactor
Espressif refactor WROOM32 ESP32
2 parents 9d18648 + 5754640 commit e4c9a73

19 files changed

Lines changed: 166 additions & 159 deletions

File tree

IDE/Espressif/ESP-IDF/examples/wolfssl_test/main/main.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,18 +170,18 @@ void app_main(void)
170170
ESP_LOGI(TAG, "Stack HWM: %d\n", uxTaskGetStackHighWaterMark(NULL));
171171

172172
/* check to see if we are using hardware encryption */
173-
#if defined(NO_ESP32WROOM32_CRYPT)
174-
ESP_LOGI(TAG, "NO_ESP32WROOM32_CRYPT defined! HW acceleration DISABLED.");
173+
#if defined(NO_ESP32_CRYPT)
174+
ESP_LOGI(TAG, "NO_ESP32_CRYPT defined! HW acceleration DISABLED.");
175175
#else
176176
#if defined(CONFIG_IDF_TARGET_ESP32C3)
177-
#error "ESP32WROOM32_CRYPT not yet supported on ESP32-C3"
177+
#error "ESP32_CRYPT not yet supported on ESP32-C3"
178178
#elif defined(CONFIG_IDF_TARGET_ESP32S2)
179-
#error "ESP32WROOM32_CRYPT not yet supported on ESP32-S2"
179+
#error "ESP32_CRYPT not yet supported on ESP32-S2"
180180
#elif defined(CONFIG_IDF_TARGET_ESP32S3)
181-
/* #error "ESP32WROOM32_CRYPT not yet supported on ESP32-S3" */
182-
ESP_LOGI(TAG, "ESP32WROOM32_CRYPT is enabled for ESP32-S3.");
181+
/* #error "ESP32_CRYPT not yet supported on ESP32-S3" */
182+
ESP_LOGI(TAG, "ESP32_CRYPT is enabled for ESP32-S3.");
183183
#else
184-
ESP_LOGI(TAG, "ESP32WROOM32_CRYPT is enabled.");
184+
ESP_LOGI(TAG, "ESP32_CRYPT is enabled.");
185185
#endif
186186
#endif
187187

IDE/Espressif/ESP-IDF/examples/wolfssl_test_idf/main/main.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,17 +170,17 @@ void app_main(void)
170170
ESP_LOGI(TAG, "Stack HWM: %d\n", uxTaskGetStackHighWaterMark(NULL));
171171

172172
/* check to see if we are using hardware encryption */
173-
#if defined(NO_ESP32WROOM32_CRYPT)
174-
ESP_LOGI(TAG, "NO_ESP32WROOM32_CRYPT defined! HW acceleration DISABLED.");
173+
#if defined(NO_ESP32_CRYPT)
174+
ESP_LOGI(TAG, "NO_ESP32_CRYPT defined! HW acceleration DISABLED.");
175175
#else
176176
#if defined(CONFIG_IDF_TARGET_ESP32C3)
177-
#error "ESP32WROOM32_CRYPT not yet supported on ESP32-C3"
177+
#error "ESP32_CRYPT not yet supported on ESP32-C3"
178178
#elif defined(CONFIG_IDF_TARGET_ESP32S2)
179-
#error "ESP32WROOM32_CRYPT not yet supported on ESP32-S2"
179+
#error "ESP32_CRYPT not yet supported on ESP32-S2"
180180
#elif defined(CONFIG_IDF_TARGET_ESP32S3)
181-
#error "ESP32WROOM32_CRYPT not yet supported on ESP32-S3"
181+
#error "ESP32_CRYPT not yet supported on ESP32-S3"
182182
#else
183-
ESP_LOGI(TAG, "ESP32WROOM32_CRYPT is enabled.");
183+
ESP_LOGI(TAG, "ESP32_CRYPT is enabled.");
184184
#endif
185185
#endif
186186

IDE/Espressif/ESP-IDF/user_settings.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@
1919
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
2020
*/
2121
#undef WOLFSSL_ESPIDF
22-
#undef WOLFSSL_ESPWROOM32
22+
#undef WOLFSSL_ESP32
2323
#undef WOLFSSL_ESPWROOM32SE
24-
#undef WOLFSSL_ESPWROOM32
24+
#undef WOLFSSL_ESP32
2525
#undef WOLFSSL_ESP8266
2626

2727
#define WOLFSSL_ESPIDF
2828

2929
/*
3030
* choose ONE of these Espressif chips to define:
3131
*
32-
* WOLFSSL_ESPWROOM32
32+
* WOLFSSL_ESP32
3333
* WOLFSSL_ESPWROOM32SE
3434
* WOLFSSL_ESP8266
3535
*/
3636

37-
#define WOLFSSL_ESPWROOM32
37+
#define WOLFSSL_ESP32
3838

3939
/* #define DEBUG_WOLFSSL_VERBOSE */
4040

@@ -86,7 +86,7 @@
8686
#endif
8787

8888
/* rsa primitive specific definition */
89-
#if defined(WOLFSSL_ESPWROOM32) || defined(WOLFSSL_ESPWROOM32SE)
89+
#if defined(WOLFSSL_ESP32) || defined(WOLFSSL_ESPWROOM32SE)
9090
/* Define USE_FAST_MATH and SMALL_STACK */
9191
#define ESP32_USE_RSA_PRIMITIVE
9292
/* threshold for performance adjustment for hw primitive use */
@@ -98,7 +98,7 @@
9898

9999
/* debug options */
100100
/* #define DEBUG_WOLFSSL */
101-
/* #define WOLFSSL_ESP32WROOM32_CRYPT_DEBUG */
101+
/* #define WOLFSSL_ESP32_CRYPT_DEBUG */
102102
/* #define WOLFSSL_ATECC508A_DEBUG */
103103

104104
/* date/time */
@@ -108,10 +108,10 @@
108108
/* #define XTIME time */
109109

110110
/* when you want not to use HW acceleration */
111-
/* #define NO_ESP32WROOM32_CRYPT */
112-
/* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_HASH*/
113-
/* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_AES */
114-
/* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_RSA_PRI */
111+
/* #define NO_ESP32_CRYPT */
112+
/* #define NO_WOLFSSL_ESP32_CRYPT_HASH*/
113+
/* #define NO_WOLFSSL_ESP32_CRYPT_AES */
114+
/* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI */
115115

116116
/* adjust wait-timeout count if you see timeout in rsa hw acceleration */
117117
#define ESP_RSA_TIMEOUT_CNT 0x249F00

wolfcrypt/src/aes.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -676,8 +676,8 @@ block cipher mechanism that uses n-bit binary string parameter key with 128-bits
676676
#error nRF51 AES Hardware does not support decrypt
677677
#endif /* HAVE_AES_DECRYPT */
678678

679-
#elif defined(WOLFSSL_ESP32WROOM32_CRYPT) && \
680-
!defined(NO_WOLFSSL_ESP32WROOM32_CRYPT_AES)
679+
#elif defined(WOLFSSL_ESP32_CRYPT) && \
680+
!defined(NO_WOLFSSL_ESP32_CRYPT_AES)
681681

682682
#include "wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h"
683683

@@ -2865,8 +2865,8 @@ static WARN_UNUSED_RESULT int wc_AesDecrypt(
28652865
{
28662866
return wc_AesSetKey(aes, userKey, keylen, iv, dir);
28672867
}
2868-
#elif defined(WOLFSSL_ESP32WROOM32_CRYPT) && \
2869-
!defined(NO_WOLFSSL_ESP32WROOM32_CRYPT_AES)
2868+
#elif defined(WOLFSSL_ESP32_CRYPT) && \
2869+
!defined(NO_WOLFSSL_ESP32_CRYPT_AES)
28702870

28712871
int wc_AesSetKey(Aes* aes, const byte* userKey, word32 keylen,
28722872
const byte* iv, int dir)
@@ -3176,8 +3176,8 @@ static WARN_UNUSED_RESULT int wc_AesDecrypt(
31763176
rk = aes->key;
31773177
XMEMCPY(rk, userKey, keylen);
31783178
#if defined(LITTLE_ENDIAN_ORDER) && !defined(WOLFSSL_PIC32MZ_CRYPT) && \
3179-
(!defined(WOLFSSL_ESP32WROOM32_CRYPT) || \
3180-
defined(NO_WOLFSSL_ESP32WROOM32_CRYPT_AES))
3179+
(!defined(WOLFSSL_ESP32_CRYPT) || \
3180+
defined(NO_WOLFSSL_ESP32_CRYPT_AES))
31813181
ByteReverseWords(rk, rk, keylen);
31823182
#endif
31833183

@@ -4152,8 +4152,8 @@ int wc_AesSetIV(Aes* aes, const byte* iv)
41524152
return ret;
41534153
}
41544154
#endif /* HAVE_AES_DECRYPT */
4155-
#elif defined(WOLFSSL_ESP32WROOM32_CRYPT) && \
4156-
!defined(NO_WOLFSSL_ESP32WROOM32_CRYPT_AES)
4155+
#elif defined(WOLFSSL_ESP32_CRYPT) && \
4156+
!defined(NO_WOLFSSL_ESP32_CRYPT_AES)
41574157

41584158
int wc_AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)
41594159
{
@@ -4641,8 +4641,8 @@ int wc_AesSetIV(Aes* aes, const byte* iv)
46414641
#elif defined(WOLFSSL_DEVCRYPTO_AES)
46424642
/* implemented in wolfcrypt/src/port/devcrypt/devcrypto_aes.c */
46434643

4644-
#elif defined(WOLFSSL_ESP32WROOM32_CRYPT) && \
4645-
!defined(NO_WOLFSSL_ESP32WROOM32_CRYPT_AES)
4644+
#elif defined(WOLFSSL_ESP32_CRYPT) && \
4645+
!defined(NO_WOLFSSL_ESP32_CRYPT_AES)
46464646
/* esp32 doesn't support CRT mode by hw. */
46474647
/* use aes ecnryption plus sw implementation */
46484648
#define NEED_AES_CTR_SOFT

wolfcrypt/src/port/Espressif/esp32_aes.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333

3434
#ifndef NO_AES
3535

36-
#if defined(WOLFSSL_ESP32WROOM32_CRYPT) && \
37-
!defined(NO_WOLFSSL_ESP32WROOM32_CRYPT_AES)
36+
#if defined(WOLFSSL_ESP32_CRYPT) && \
37+
!defined(NO_WOLFSSL_ESP32_CRYPT_AES)
3838
#include "sdkconfig.h" /* programmatically generated from sdkconfig */
3939
#include <wolfssl/wolfcrypt/aes.h>
4040
#include "wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h"
@@ -428,5 +428,5 @@ int wc_esp32AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz)
428428
return 0;
429429
} /* wc_esp32AesCbcDecrypt */
430430

431-
#endif /* WOLFSSL_ESP32WROOM32_CRYPT */
431+
#endif /* WOLFSSL_ESP32_CRYPT */
432432
#endif /* NO_AES */

wolfcrypt/src/port/Espressif/esp32_mp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030

3131
#if !defined(NO_RSA) || defined(HAVE_ECC)
3232

33-
#if defined(WOLFSSL_ESP32WROOM32_CRYPT_RSA_PRI) && \
34-
!defined(NO_WOLFSSL_ESP32WROOM32_CRYPT_RSA_PRI)
33+
#if defined(WOLFSSL_ESP32_CRYPT_RSA_PRI) && \
34+
!defined(NO_WOLFSSL_ESP32_CRYPT_RSA_PRI)
3535

3636
#ifdef NO_INLINE
3737
#include <wolfssl/wolfcrypt/misc.h>
@@ -908,7 +908,7 @@ int esp_mp_exptmod(MATH_INT_T* X, MATH_INT_T* Y, word32 Ys, MATH_INT_T* M, MATH_
908908
#endif
909909
}
910910

911-
#endif /* WOLFSSL_ESP32WROOM32_CRYPT_RSA_PRI) &&
912-
* !NO_WOLFSSL_ESP32WROOM32_CRYPT_RSA_PRI */
911+
#endif /* WOLFSSL_ESP32_CRYPT_RSA_PRI) &&
912+
* !NO_WOLFSSL_ESP32_CRYPT_RSA_PRI */
913913

914914
#endif /* !NO_RSA || HAVE_ECC */

wolfcrypt/src/port/Espressif/esp32_sha.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434

3535

3636
/* this entire file content is excluded if not using HW hash acceleration */
37-
#if defined(WOLFSSL_ESP32WROOM32_CRYPT) && \
38-
!defined(NO_WOLFSSL_ESP32WROOM32_CRYPT_HASH)
37+
#if defined(WOLFSSL_ESP32_CRYPT) && \
38+
!defined(NO_WOLFSSL_ESP32_CRYPT_HASH)
3939

4040
/* TODO this may be chip type dependent: add support for others */
4141
#include <hal/clk_gate_ll.h> /* ESP32-WROOM */
@@ -1364,5 +1364,5 @@ int esp_sha512_digest_process(struct wc_Sha512* sha, byte blockproc)
13641364
return ret;
13651365
} /* esp_sha512_digest_process */
13661366
#endif /* WOLFSSL_SHA512 || WOLFSSL_SHA384 */
1367-
#endif /* WOLFSSL_ESP32WROOM32_CRYPT */
1367+
#endif /* WOLFSSL_ESP32_CRYPT */
13681368
#endif /* !defined(NO_SHA) ||... */

wolfcrypt/src/port/Espressif/esp32_util.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <wolfssl/wolfcrypt/settings.h>
2222
#include <wolfssl/version.h>
2323

24-
#if defined(WOLFSSL_ESP32WROOM32_CRYPT) && \
24+
#if defined(WOLFSSL_ESP32_CRYPT) && \
2525
(!defined(NO_AES) || !defined(NO_SHA) || !defined(NO_SHA256) ||\
2626
defined(WOLFSSL_SHA384) || defined(WOLFSSL_SHA512))
2727

@@ -170,35 +170,35 @@ static int ShowExtendedSystemInfo_platform_espressif()
170170
#endif
171171

172172
/* check to see if we are using hardware encryption */
173-
#if defined(NO_ESP32WROOM32_CRYPT)
174-
WOLFSSL_VERSION_PRINTF("NO_ESP32WROOM32_CRYPT defined! "
173+
#if defined(NO_ESP32_CRYPT)
174+
WOLFSSL_VERSION_PRINTF("NO_ESP32_CRYPT defined! "
175175
"HW acceleration DISABLED.");
176176
#else
177177
/* first show what platform hardware acceleration is enabled
178178
** (some new platforms may not be supported yet) */
179179
#if defined(CONFIG_IDF_TARGET_ESP32)
180-
WOLFSSL_VERSION_PRINTF("ESP32WROOM32_CRYPT is enabled for ESP32.");
180+
WOLFSSL_VERSION_PRINTF("ESP32_CRYPT is enabled for ESP32.");
181181
#elif defined(CONFIG_IDF_TARGET_ESP32S2)
182-
WOLFSSL_VERSION_PRINTF("ESP32WROOM32_CRYPT is enabled for ESP32-S2.");
182+
WOLFSSL_VERSION_PRINTF("ESP32_CRYPT is enabled for ESP32-S2.");
183183
#elif defined(CONFIG_IDF_TARGET_ESP32S3)
184-
WOLFSSL_VERSION_PRINTF("ESP32WROOM32_CRYPT is enabled for ESP32-S3.");
184+
WOLFSSL_VERSION_PRINTF("ESP32_CRYPT is enabled for ESP32-S3.");
185185
#else
186-
#error "ESP32WROOM32_CRYPT not yet supported on this IDF TARGET"
186+
#error "ESP32_CRYPT not yet supported on this IDF TARGET"
187187
#endif
188188

189189
/* Even though enabled, some specifics may be disabled */
190-
#if defined(NO_WOLFSSL_ESP32WROOM32_CRYPT_HASH)
191-
WOLFSSL_VERSION_PRINTF("NO_WOLFSSL_ESP32WROOM32_CRYPT_HASH is defined!"
190+
#if defined(NO_WOLFSSL_ESP32_CRYPT_HASH)
191+
WOLFSSL_VERSION_PRINTF("NO_WOLFSSL_ESP32_CRYPT_HASH is defined!"
192192
"(disabled HW SHA).");
193193
#endif
194194

195-
#if defined(NO_WOLFSSL_ESP32WROOM32_CRYPT_AES)
196-
WOLFSSL_VERSION_PRINTF("NO_WOLFSSL_ESP32WROOM32_CRYPT_AES is defined!"
195+
#if defined(NO_WOLFSSL_ESP32_CRYPT_AES)
196+
WOLFSSL_VERSION_PRINTF("NO_WOLFSSL_ESP32_CRYPT_AES is defined!"
197197
"(disabled HW AES).");
198198
#endif
199199

200-
#if defined(NO_WOLFSSL_ESP32WROOM32_CRYPT_RSA_PRI)
201-
WOLFSSL_VERSION_PRINTF("NO_WOLFSSL_ESP32WROOM32_CRYPT_RSA_PRI defined!"
200+
#if defined(NO_WOLFSSL_ESP32_CRYPT_RSA_PRI)
201+
WOLFSSL_VERSION_PRINTF("NO_WOLFSSL_ESP32_CRYPT_RSA_PRI defined!"
202202
"(disabled HW RSA)");
203203
#endif
204204
#endif

wolfcrypt/src/random.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3431,7 +3431,7 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
34313431
#elif defined(WOLFSSL_ESPIDF)
34323432

34333433
/* Espressif */
3434-
#if defined(WOLFSSL_ESPWROOM32) || defined(WOLFSSL_ESPWROOM32SE)
3434+
#if defined(WOLFSSL_ESP32) || defined(WOLFSSL_ESPWROOM32SE)
34353435

34363436
/* Espressif ESP32 */
34373437
#include <esp_system.h>
@@ -3477,7 +3477,7 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
34773477

34783478
return 0;
34793479
}
3480-
#endif /* end WOLFSSL_ESPWROOM32 */
3480+
#endif /* end WOLFSSL_ESP32 */
34813481

34823482
#elif defined(WOLFSSL_LINUXKM)
34833483
#include <linux/random.h>

wolfcrypt/src/sha.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@
5858
#include <wolfssl/wolfcrypt/port/caam/wolfcaam_fsl_nxp.h>
5959
#endif
6060

61-
#undef WOLFSSL_USE_ESP32WROOM32_CRYPT_HASH_HW
62-
#if defined(WOLFSSL_ESP32WROOM32_CRYPT) && \
63-
!defined(NO_WOLFSSL_ESP32WROOM32_CRYPT_HASH)
61+
#undef WOLFSSL_USE_ESP32_CRYPT_HASH_HW
62+
#if defined(WOLFSSL_ESP32_CRYPT) && \
63+
!defined(NO_WOLFSSL_ESP32_CRYPT_HASH)
6464
/* define a single keyword for simplicity & readability
6565
*
6666
* by default the HW acceleration is on for ESP32-WROOM32
6767
* but individual components can be turned off.
6868
*/
69-
#define WOLFSSL_USE_ESP32WROOM32_CRYPT_HASH_HW
69+
#define WOLFSSL_USE_ESP32_CRYPT_HASH_HW
7070
#include "wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h"
7171

7272
/* Although we have hardware acceleration,
@@ -78,7 +78,7 @@
7878
** We'll be using software for RISC-V at this time */
7979
static const char* TAG = "wc_sha-c3";
8080
#else
81-
#undef WOLFSSL_USE_ESP32WROOM32_CRYPT_HASH_HW
81+
#undef WOLFSSL_USE_ESP32_CRYPT_HASH_HW
8282
#endif
8383

8484
/* fips wrapper calls, user can call direct */
@@ -321,7 +321,7 @@
321321
!defined(WOLFSSL_QNX_CAAM)
322322
/* wolfcrypt/src/port/caam/caam_sha.c */
323323

324-
#elif defined(WOLFSSL_USE_ESP32WROOM32_CRYPT_HASH_HW) || \
324+
#elif defined(WOLFSSL_USE_ESP32_CRYPT_HASH_HW) || \
325325
defined(WOLFSSL_USE_ESP32C3_CRYPT_HASH_HW)
326326

327327
/* This function initializes SHA.
@@ -567,7 +567,7 @@ int wc_InitSha_ex(wc_Sha* sha, void* heap, int devId)
567567
sha->devCtx = NULL;
568568
#endif
569569

570-
#ifdef WOLFSSL_USE_ESP32WROOM32_CRYPT_HASH_HW
570+
#ifdef WOLFSSL_USE_ESP32_CRYPT_HASH_HW
571571
if (sha->ctx.mode != ESP32_SHA_INIT) {
572572
/* it may be interesting to see old values during debugging */
573573
ESP_LOGV(TAG, "Set ctx mode from prior value: %d", sha->ctx.mode);
@@ -651,7 +651,7 @@ int wc_ShaUpdate(wc_Sha* sha, const byte* data, word32 len)
651651
ByteReverseWords(sha->buffer, sha->buffer, WC_SHA_BLOCK_SIZE);
652652
#endif
653653

654-
#if defined(WOLFSSL_USE_ESP32WROOM32_CRYPT_HASH_HW)
654+
#if defined(WOLFSSL_USE_ESP32_CRYPT_HASH_HW)
655655
if (sha->ctx.mode == ESP32_SHA_INIT) {
656656
ESP_LOGV(TAG, "wc_ShaUpdate try hardware");
657657
esp_sha_try_hw_lock(&sha->ctx);
@@ -712,7 +712,7 @@ int wc_ShaUpdate(wc_Sha* sha, const byte* data, word32 len)
712712
ByteReverseWords(local32, local32, WC_SHA_BLOCK_SIZE);
713713
#endif
714714

715-
#if defined(WOLFSSL_USE_ESP32WROOM32_CRYPT_HASH_HW)
715+
#if defined(WOLFSSL_USE_ESP32_CRYPT_HASH_HW)
716716
if (sha->ctx.mode == ESP32_SHA_INIT){
717717
esp_sha_try_hw_lock(&sha->ctx);
718718
}
@@ -806,7 +806,7 @@ int wc_ShaFinal(wc_Sha* sha, byte* hash)
806806
ByteReverseWords(sha->buffer, sha->buffer, WC_SHA_BLOCK_SIZE);
807807
#endif
808808

809-
#if defined(WOLFSSL_USE_ESP32WROOM32_CRYPT_HASH_HW)
809+
#if defined(WOLFSSL_USE_ESP32_CRYPT_HASH_HW)
810810
/* For a fresh sha.ctx, try to use hardware acceleration */
811811
if (sha->ctx.mode == ESP32_SHA_INIT) {
812812
esp_sha_try_hw_lock(&sha->ctx);
@@ -855,7 +855,7 @@ int wc_ShaFinal(wc_Sha* sha, byte* hash)
855855
2 * sizeof(word32));
856856
#endif
857857

858-
#if defined(WOLFSSL_USE_ESP32WROOM32_CRYPT_HASH_HW)
858+
#if defined(WOLFSSL_USE_ESP32_CRYPT_HASH_HW)
859859
if (sha->ctx.mode == ESP32_SHA_INIT) {
860860
esp_sha_try_hw_lock(&sha->ctx);
861861
}
@@ -1012,7 +1012,7 @@ int wc_ShaCopy(wc_Sha* src, wc_Sha* dst)
10121012
ret = se050_hash_copy(&src->se050Ctx, &dst->se050Ctx);
10131013
#endif
10141014

1015-
#if defined(WOLFSSL_USE_ESP32WROOM32_CRYPT_HASH_HW)
1015+
#if defined(WOLFSSL_USE_ESP32_CRYPT_HASH_HW)
10161016
esp_sha_ctx_copy(src, dst);
10171017
#endif
10181018

0 commit comments

Comments
 (0)