Merged
Conversation
Contributor
billphipps
commented
Apr 16, 2025
- Correct potential flash_unit error where program was being called with a 0 count.
- Add standalone flash and flash_unit tests.
- Shift wh_error codes to not conflict with wolfcrypt/error-ssl.h codes
- Use wolfcrypt CURVE25519 export buffer size if available.
- Update wh_flash.h interface documentation to better explain the expected behavior.
bigbrett
requested changes
Apr 16, 2025
Contributor
|
@billphipps can you squash the WIP debugging commits too? |
Add flash unit tests. Shift error codes. Correct 25519 export size. Remove O_SYNC on PFF.
a75df8b to
f1a19cb
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the flashunit program by addressing a potential flash_unit error, updating error codes to avoid conflicts, and expanding test coverage for flash operations while updating documentation and buffer sizing for CURVE25519.
- Adjust flash interface and error codes for consistency and non-conflict with external libraries.
- Add comprehensive flash and flash_unit tests in both NVM and standalone configurations.
- Update documentation and buffer sizes to use wolfcrypt CURVE25519 export size when available.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| wolfhsm/wh_flash.h | Added detailed API comments to flash interface function pointers. |
| wolfhsm/wh_error.h | Shifted error codes to avoid conflict and added new error definitions. |
| test/wh_test_nvm_flash.h | Added a new function to execute flash HAL tests. |
| test/wh_test_nvm_flash.c | Added standalone flash tests and updated flash unit test calls. |
| test/wh_test_crypto.c | Minor formatting update. |
| test/user_settings.h | Added RSA_MIN_SIZE define to user settings. |
| src/wh_server_crypto.c | Updated CURVE25519 export buffer size usage and fixed header comments. |
| src/wh_flash_unit.c | Added a check on the count before performing aligned flash programming. |
| port/posix/posix_flash_file.c | Updated file open flags with a comment regarding the O_SYNC recommendation. |
Co-authored-by: Copilot <[email protected]>
billphipps
commented
Apr 16, 2025
billphipps
commented
Apr 16, 2025
bigbrett
approved these changes
Apr 16, 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.