From 2193df1d6247b76fc2aba031e9850159ccf8787c Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Fri, 10 Dec 2021 23:57:14 -0600 Subject: [PATCH] add WOLFSSL_ECC_NO_SMALL_STACK. --- wolfcrypt/src/ecc.c | 5 +++++ wolfssl/wolfcrypt/ecc.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index 65d668c4b..4c4c4e67f 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -28,6 +28,11 @@ /* in case user set HAVE_ECC there */ #include +#ifdef WOLFSSL_ECC_NO_SMALL_STACK +#undef WOLFSSL_SMALL_STACK +#undef WOLFSSL_SMALL_STACK_CACHE +#endif + /* Possible ECC enable options: * HAVE_ECC: Overall control of ECC default: on diff --git a/wolfssl/wolfcrypt/ecc.h b/wolfssl/wolfcrypt/ecc.h index fa97b11fc..50db1e22e 100644 --- a/wolfssl/wolfcrypt/ecc.h +++ b/wolfssl/wolfcrypt/ecc.h @@ -395,7 +395,7 @@ typedef struct { mp_int* z; /* The z coordinate */ alt_fp_int xyz[3]; #endif -#ifdef WOLFSSL_SMALL_STACK_CACHE +#if defined(WOLFSSL_SMALL_STACK_CACHE) && !defined(WOLFSSL_ECC_NO_SMALL_STACK) ecc_key* key; #endif } ecc_point; @@ -496,7 +496,7 @@ struct ecc_key { byte deterministic:1; #endif -#ifdef WOLFSSL_SMALL_STACK_CACHE +#if defined(WOLFSSL_SMALL_STACK_CACHE) && !defined(WOLFSSL_ECC_NO_SMALL_STACK) mp_int* t1; mp_int* t2; #ifdef ALT_ECC_SIZE