From 16f39b4e77bdf9ddb6e12ceb64d00ab93e2acb9b Mon Sep 17 00:00:00 2001 From: Tesfa Mael Date: Thu, 25 Feb 2021 16:42:18 -0800 Subject: [PATCH 1/2] Fix _sp_add_d err --- wolfcrypt/src/sp_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/sp_int.c b/wolfcrypt/src/sp_int.c index cbd24ee19..1a9221442 100644 --- a/wolfcrypt/src/sp_int.c +++ b/wolfcrypt/src/sp_int.c @@ -2996,7 +2996,7 @@ int sp_cmp_d(sp_int* a, sp_int_digit d) #endif #if defined(WOLFSSL_SP_INT_NEGATIVE) || !defined(NO_PWDBASED) || \ - defined(WOLFSSL_KEY_GEN) || !defined(NO_DH) || defined(HAVE_ECC) || \ + defined(WOLFSSL_KEY_GEN) || !defined(NO_DH) || \ (!defined(NO_RSA) && !defined(WOLFSSL_RSA_VERIFY_ONLY)) /* Add a one digit number to the multi-precision number. * From 19fa75c6a8dd45532ef565beb06f716d2d0e5001 Mon Sep 17 00:00:00 2001 From: Tesfa Mael Date: Fri, 26 Feb 2021 15:44:11 -0800 Subject: [PATCH 2/2] static memory no longer requires fast math --- wolfssl/wolfcrypt/settings.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h index 6d180137e..cb3650bc1 100644 --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h @@ -2094,8 +2094,9 @@ extern void uITRON4_free(void *p) ; #if defined(HAVE_IO_POOL) || defined(XMALLOC_USER) || defined(NO_WOLFSSL_MEMORY) #error static memory cannot be used with HAVE_IO_POOL, XMALLOC_USER or NO_WOLFSSL_MEMORY #endif - #if !defined(USE_FAST_MATH) && !defined(NO_BIG_INT) - #error static memory requires fast math please define USE_FAST_MATH + #if !defined(WOLFSSL_SP_NO_MALLOC) && \ + !defined(USE_FAST_MATH) && !defined(NO_BIG_INT) + #error The static memory option is only supported for fast math or SP with no malloc #endif #ifdef WOLFSSL_SMALL_STACK #error static memory does not support small stack please undefine