Skip to content

Commit 3747cc6

Browse files
committed
remove erroneous coupling between SMALL_STACK and WOLFHSM_SERVER
1 parent 8d3369a commit 3747cc6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

include/user_settings.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -505,20 +505,20 @@ extern int tolower(int c);
505505
# define WOLFSSL_SP_NO_DYN_STACK
506506
#endif
507507

508-
#if !defined(WOLFBOOT_SMALL_STACK) && !defined(WOLFBOOT_ENABLE_WOLFHSM_SERVER)
508+
#if defined(WOLFBOOT_SMALL_STACK)
509+
# if defined(WOLFBOOT_HUGE_STACK)
510+
# error "Cannot use SMALL_STACK=1 with HUGE_STACK=1"
511+
# endif
512+
# define WOLFSSL_SMALL_STACK
513+
#else
509514
# if defined(WOLFSSL_SP_MATH) || defined(WOLFSSL_SP_MATH_ALL)
510515
# define WOLFSSL_SP_NO_MALLOC
511516
# define WOLFSSL_SP_NO_DYN_STACK
512517
# endif
513-
# if !defined(SECURE_PKCS11)
518+
# if !defined(SECURE_PKCS11) && !defined(WOLFBOOT_ENABLE_WOLFHSM_SERVER)
514519
# define NO_WOLFSSL_MEMORY
515520
# define WOLFSSL_NO_MALLOC
516521
# endif
517-
#else
518-
# if defined(WOLFBOOT_HUGE_STACK)
519-
# error "Cannot use SMALL_STACK=1 with HUGE_STACK=1"
520-
# endif
521-
# define WOLFSSL_SMALL_STACK
522522
#endif
523523

524524

0 commit comments

Comments
 (0)