Merged
Conversation
Contributor
bigbrett
commented
Aug 12, 2025
- Add support for new "non-exportable" flag to NVM objects, keys, and certs
- Fixes unrelated tests to accommodate new feature
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for a new "non-exportable" flag to NVM objects, keys, and certificates, preventing sensitive data from being read or exported. The implementation includes comprehensive access control checks across both regular and DMA operations.
- Adds
whNvmFlagsparameter to certificate storage APIs to support non-exportable certificates - Implements access control enforcement in server-side handlers for NVM, keystore, and certificate operations
- Updates test cases to use
WH_NVM_FLAGS_NONEinstead of deprecatedWH_NVM_FLAGS_ANY
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| wolfhsm/wh_server_cert.h | Adds flags parameter to certificate addition API |
| wolfhsm/wh_message_cert.h | Updates message structures to include flags field |
| wolfhsm/wh_client.h | Updates client certificate APIs with flags support |
| test/wh_test_crypto.c | Adds comprehensive tests for non-exportable keystore functionality |
| test/wh_test_clientserver.c | Adds tests for non-exportable NVM access protection |
| test/wh_test_cert.c | Adds tests for non-exportable certificate functionality |
| src/wh_server_nvm.c | Implements non-exportable flag enforcement for NVM operations |
| src/wh_server_keystore.c | Implements non-exportable flag enforcement for key operations |
| src/wh_server_cert.c | Implements non-exportable flag enforcement for certificate operations |
| src/wh_message_cert.c | Updates message translation to handle flags field |
| src/wh_client_cert.c | Updates client certificate APIs to support flags |
| examples/demo/client/wh_demo_client_secboot.c | Updates to use proper flags value |
| examples/demo/client/wh_demo_client_nvm.c | Updates to use proper flags value |
bb0cb94 to
c83d931
Compare
billphipps
previously approved these changes
Aug 12, 2025
billphipps
approved these changes
Aug 18, 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.