add WOLFSSL_SMALL_STACK_STATIC macro, and use it to conditionally declare const byte vectors in test.c static for stack depth control -- currently only enabled for linuxkm, but should be compatible with any target with a TLB (virtual memory).

This commit is contained in:
Daniel Pouzzner
2020-12-22 17:12:57 -06:00
parent 56071ac21f
commit f06361ddf6
3 changed files with 491 additions and 484 deletions

View File

@@ -196,7 +196,7 @@ AC_ARG_ENABLE([linuxkm-defaults],
if test "$ENABLED_LINUXKM_DEFAULTS" = "yes" if test "$ENABLED_LINUXKM_DEFAULTS" = "yes"
then then
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DH_CONST -DWOLFSSL_SP_MOD_WORD_RP -DWOLFSSL_OLD_PRIME_CHECK -DWOLFSSL_SP_DIV_64 -DWOLFSSL_SP_DIV_WORD_HALF" AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DH_CONST -DWOLFSSL_SP_MOD_WORD_RP -DWOLFSSL_OLD_PRIME_CHECK -DWOLFSSL_SP_DIV_64 -DWOLFSSL_SP_DIV_WORD_HALF -DWOLFSSL_SMALL_STACK_STATIC"
fi fi
AC_ARG_WITH([linux-source], AC_ARG_WITH([linux-source],

File diff suppressed because it is too large Load Diff

View File

@@ -2380,6 +2380,13 @@ extern void uITRON4_free(void *p) ;
#undef WOLFSSL_SMALL_STACK #undef WOLFSSL_SMALL_STACK
#endif #endif
#ifdef WOLFSSL_SMALL_STACK_STATIC
#undef WOLFSSL_SMALL_STACK_STATIC
#define WOLFSSL_SMALL_STACK_STATIC static
#else
#define WOLFSSL_SMALL_STACK_STATIC
#endif
/* The client session cache requires time for timeout */ /* The client session cache requires time for timeout */
#if defined(NO_ASN_TIME) && !defined(NO_SESSION_CACHE) #if defined(NO_ASN_TIME) && !defined(NO_SESSION_CACHE)
#define NO_SESSION_CACHE #define NO_SESSION_CACHE