Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@billphipps
Copy link
Contributor

  1. Correct potential flash_unit error where program was being called with a 0 count.
  2. Add standalone flash and flash_unit tests.
  3. Shift wh_error codes to not conflict with wolfcrypt/error-ssl.h codes
  4. Use wolfcrypt CURVE25519 export buffer size if available.
  5. Update wh_flash.h interface documentation to better explain the expected behavior.

@billphipps billphipps self-assigned this Apr 16, 2025
Copy link
Contributor

Copilot AI left a 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.

@bigbrett
Copy link
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.
@billphipps billphipps force-pushed the fix_flashunit_program branch from a75df8b to f1a19cb Compare April 16, 2025 17:16
@billphipps billphipps requested review from bigbrett and Copilot April 16, 2025 17:18
Copy link
Contributor

Copilot AI left a 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.

@bigbrett bigbrett merged commit c5c6e81 into wolfSSL:main Apr 16, 2025
2 checks passed
@billphipps billphipps deleted the fix_flashunit_program branch April 18, 2025 17:17
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