wolfHSM server support + cert chain auth#577
Merged
danielinux merged 2 commits intowolfSSL:masterfrom Jun 25, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors wolfHSM integration in wolfBoot by adding native server support and certificate chain authentication while updating related CI tests and build configurations. Key changes include:
- Migrating from dedicated wolfHSM client objects to a unified WOLFHSM_OBJS usage and conditional handling for client/server modes.
- Adding new HAL functions for initializing and cleaning up the wolfHSM server.
- Updating documentation and CI workflows to reflect the new server mode and cert chain verification support.
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test-app/Makefile | Updated object lists to use unified WOLFHSM_OBJS in client and server configurations. |
| src/update_*.c | Adjusted calls to hsm disconnect/cleanup functions based on client/server configuration. |
| src/loader.c | Added wolfHSM server init block alongside client initialization. |
| src/image.c | Expanded conditionals for signature verification to support both client/server modes. |
| options.mk | Separated wolfHSM client and server option blocks with corresponding object and flag changes. |
| include/user_settings.h & include/hal.h | Updated macros and external declarations for unified HSM identifiers and functions. |
| hal/sim.c & hal/aurix_tc3xx.c | Refactored HSM context variables and initialization routines. |
| docs/* | Updated documentation to cover both wolfHSM client and server modes along with cert chain auth. |
| config/examples/*, arch.mk, Makefile, workflows | Adjustments to build configurations and CI workflows to support the new server mode. |
Comments suppressed due to low confidence (2)
src/image.c:274
- The default fallback for ECC key assignment only handles the client mode. Consider adding explicit handling for server mode (when certificate chain verification is not active) to ensure consistent key assignment across configurations.
ret = wh_Client_EccSetKeyId(&ecc, hsmKeyIdPubKey);
Makefile:70
- [nitpick] Include or update a comment explaining the transition from WOLFHSM_CLIENT_OBJS to a unified WOLFHSM_OBJS to help maintain clarity as to how client and server modes are handled.
OBJS+=$(WOLFHSM_OBJS)
dgarske
approved these changes
Jun 24, 2025
billphipps
approved these changes
Jun 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR also should fix CI failures due to wolfCrypt
WC_RNG HAVE_GETPIDchange