You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WOLFCRYPT_TZ_WOLFHSM: review fixes and unit-test coverage
- options.mk: drop duplicate WOLFHSM_CLIENT_OBJS / WOLFHSM_SERVER_OBJS
block; top-of-file definitions are reached before all consumers.
- wolfhsm_callable.c: idempotency guard in wcs_wolfhsm_init; defensive
memset of g_srv_tx_ctx; move g_flash_cfg to a stack local; clamp
rsp_size to rsp_capacity before publishing *rspSz; set *rspSz = 0
on every early-validation error path; use { 0 } initializer; switch
to #ifdef WOLF_CRYPTO_CB.
- wolfhsm_flash_hal.c: rename _Foo callbacks to whFlashH5_Foo to avoid
C-reserved leading-underscore-uppercase identifiers; constant-time
compare in Verify since data may be key material; defensive
wc_ForceZero(cached_sector) on entry to Program; Erase short-circuits
size == 0 before the alignment check for consistency.
- test-app/wcs/wolfhsm_test.c: split AesSetIV vs AesCbcEncrypt error
diagnostics; KeyEvict the cached key when KeyCommit fails; use { 0 }
initializer for nsc_cfg.
- tools/unit-tests/Makefile: add WOLFBOOT_LIB_WOLFHSM default and
external-libs fallback so unit-wolfhsm_flash_hal finds wolfhsm
headers in CI.
- .github/workflows/test-external-library-paths.yml: pass
WOLFBOOT_LIB_WOLFHSM to the unit-test matrix entry.
- unit-wolfhsm_flash_hal.c: cover Cleanup, erase-failure propagation,
Read happy path, multi-sector Program, NULL context for
Read/PartitionSize/Program/Erase/Verify/BlankCheck, NULL data, and
WriteLock/WriteUnlock; use MAP_FIXED_NOREPLACE when available.
0 commit comments