Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions test/wh_test_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,17 @@ static int whTest_CryptoRsaAsync(whClientContext* ctx, WC_RNG* rng)
}
}

/* Evict keys now that we are done with them to free up cache space */
if (ret == WH_ERROR_OK && keyCached) {
ret = wh_Client_KeyEvict(ctx, keyId);
if (ret != WH_ERROR_OK) {
WH_ERROR_PRINT("KeyEvict after sign/verify failed: %d\n", ret);
}
else {
keyCached = 0;
}
}

/* 9) RsaMakeExportKey async: server generates ephemeral key, returns DER.
*/
if (ret == WH_ERROR_OK) {
Expand Down
7 changes: 6 additions & 1 deletion wolfhsm/wh_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,17 @@

/* Number of RAM keys */
#ifndef WOLFHSM_CFG_SERVER_KEYCACHE_COUNT
#if defined(WOLFHSM_CFG_SHE_EXTENSION)
/* Default to large enough cache to hold all SHE keys */
#define WOLFHSM_CFG_SERVER_KEYCACHE_COUNT 16
#else
#define WOLFHSM_CFG_SERVER_KEYCACHE_COUNT 8
#endif
#endif

/* Number of big RAM keys */
#ifndef WOLFHSM_CFG_SERVER_KEYCACHE_BIG_COUNT
#define WOLFHSM_CFG_SERVER_KEYCACHE_BIG_COUNT 1
#define WOLFHSM_CFG_SERVER_KEYCACHE_BIG_COUNT 3
#endif

/* Size in bytes of each key cache buffer */
Expand Down
Loading