Skip to content

Commit 29c4c77

Browse files
committed
wolfhsm: size keycache to the wolfHSM test working set (9 + 3)
1 parent 4d1b4e3 commit 29c4c77

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

include/user_settings.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,17 @@ extern int tolower(int c);
826826
# endif
827827
# ifndef WOLFSSL_SHA512
828828
# define WOLFSSL_SHA512
829+
# endif
830+
/* Match the keycache sizing the wolfHSM test suite is validated
831+
* against (test/config/wolfhsm_cfg.h: 9 regular + 3 big). The
832+
* library defaults (8 + 1) are one regular slot short of the
833+
* suite's peak working set and leave too few big slots for the
834+
* RSA/ML-DSA cases. */
835+
# ifndef WOLFHSM_CFG_SERVER_KEYCACHE_COUNT
836+
# define WOLFHSM_CFG_SERVER_KEYCACHE_COUNT 9
837+
# endif
838+
# ifndef WOLFHSM_CFG_SERVER_KEYCACHE_BIG_COUNT
839+
# define WOLFHSM_CFG_SERVER_KEYCACHE_BIG_COUNT 3
829840
# endif
830841
#endif /* WOLFBOOT_ENABLE_WOLFHSM_SERVER || WOLFCRYPT_TZ_WOLFHSM, !UNIT_TEST */
831842

0 commit comments

Comments
 (0)