-
Notifications
You must be signed in to change notification settings - Fork 25
Fix flashunit program #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
|
@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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]>