Fixes in ed25519 tests, add prints in timeout tests#360
Merged
Conversation
290ed57 to
96f8b74
Compare
bigbrett
approved these changes
May 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the wolfHSM test suite to accommodate recent wolfSSL behavior changes around ECC signing inputs, and to make timeout test execution more visibly traceable via success prints.
Changes:
- Ensure ECC signing tests use a non-zero digest (avoids wolfCrypt rejecting all-zero hashes unless
WC_ALLOW_ECC_ZERO_HASHis defined). - Improve Ed25519 negative-path assertions to accept both “verified==0” and
SIG_VERIFY_Eoutcomes for tampered signatures. - Add missing/consistent
WH_TEST_PRINT(...SUCCESS...)messages in timeout tests (including the POSIX wrapper).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/wh_test_timeout.c | Adds explicit success prints to individual timeout tests and ensures the POSIX entrypoint prints success after all subtests pass. |
| test/wh_test_crypto.c | Fixes ECC digest setup for signing, improves Ed25519 import keyId handoff for cleanup on partial failure, and hardens tampered-signature verification expectations. |
| test-refactor/client-server/wh_test_crypto.c | Updates ECC256 sign/verify test to use a non-zero digest to match current wolfCrypt behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Specifically, wolfssl commit wolfSSL/wolfssl#10302 requires ecc sign hash to be non-zeroed.