Skip to content

Wolfhsm no keystore#798

Draft
bigbrett wants to merge 3 commits into
wolfSSL:masterfrom
bigbrett:wolfhsm-no-keystore
Draft

Wolfhsm no keystore#798
bigbrett wants to merge 3 commits into
wolfSSL:masterfrom
bigbrett:wolfhsm-no-keystore

Conversation

@bigbrett

Copy link
Copy Markdown
Contributor

No description provided.

@bigbrett bigbrett self-assigned this Jun 15, 2026
Copilot AI review requested due to automatic review settings June 15, 2026 23:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR removes support for “local keystore public keys” in wolfHSM client mode and introduces a WOLFBOOT_NO_KEYSTORE build path to avoid compiling/linking the built-in keystore when wolfHSM is the source of trust.

Changes:

  • Make wolfHSM client builds always use HSM-resident public keys and drop WOLFBOOT_USE_WOLFHSM_PUBKEY_ID configuration.
  • Add WOLFBOOT_NO_KEYSTORE build logic and guard keystore-dependent code paths accordingly.
  • Update wolfHSM documentation to reflect the new configuration behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/image.c Adjusts signature verification and authenticity checks to support HSM-only keying and optional “no keystore” builds.
options.mk Forces --nolocalkeys and removes conditional WOLFBOOT_USE_WOLFHSM_PUBKEY_ID behavior for wolfHSM client builds.
docs/wolfHSM.md Removes WOLFBOOT_USE_WOLFHSM_PUBKEY_ID docs and clarifies key sourcing in client mode.
Makefile Adds WOLFHSM_NO_KEYSTORE logic and defines WOLFBOOT_NO_KEYSTORE to omit keystore linkage when applicable.
Comments suppressed due to low confidence (1)

src/image.c:1

  • When WOLFBOOT_NO_KEYSTORE is defined, the per-partition key authorization check is entirely bypassed. If the HSM policy is guaranteed to enforce equivalent constraints, that should be made explicit in code via a compile-time constraint (e.g., require WOLFBOOT_CERT_CHAIN_VERIFY and/or a specific HSM policy flag when WOLFBOOT_NO_KEYSTORE is set). Otherwise, consider introducing an HSM-backed partition/key-usage check so you don’t lose this authorization control in no-keystore builds.
/* image.c

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/image.c
Comment on lines +252 to 254
#if defined(WOLFBOOT_ENABLE_WOLFHSM_CLIENT) || \
(defined(WOLFBOOT_ENABLE_WOLFHSM_SERVER) && \
defined(WOLFBOOT_CERT_CHAIN_VERIFY))
Comment thread src/image.c
Comment on lines +282 to +286
#else /* WOLFBOOT_CERT_CHAIN_VERIFY */
#if defined(WOLFBOOT_ENABLE_WOLFHSM_CLIENT)
ret = wh_Client_EccSetKeyId(&ecc, hsmKeyIdPubKey);
#endif
#endif /* WOLFBOOT_USE_WOLFHSM_PUBKEY_ID */
#endif /* !WOLFBOOT_CERT_CHAIN_VERIFY */
Comment thread src/image.c
Comment on lines +471 to 473
#if defined(WOLFBOOT_ENABLE_WOLFHSM_CLIENT) || \
(defined(WOLFBOOT_ENABLE_WOLFHSM_SERVER) && \
defined(WOLFBOOT_CERT_CHAIN_VERIFY))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants