Honor WC_SIG_MIN_HASH_TYPE override in signature decision test - #11026
Open
kojo1 wants to merge 2 commits into
Open
Honor WC_SIG_MIN_HASH_TYPE override in signature decision test#11026kojo1 wants to merge 2 commits into
kojo1 wants to merge 2 commits into
Conversation
|
dgarske
requested changes
Jul 31, 2026
dgarske
left a comment
Member
There was a problem hiding this comment.
Also double check the PR description which indicates "test_wc_SignatureGetSize_ecc", but no code changes in it.
| /* Effective hash floor used by wc_SignatureVerify/Generate; mirrors the | ||
| * default in wolfcrypt/src/signature.c. A build may lower it (e.g. | ||
| * --enable-wolfclu defines WC_SIG_MIN_HASH_TYPE=WC_HASH_TYPE_MD5). */ | ||
| #ifndef WC_SIG_MIN_HASH_TYPE |
Member
There was a problem hiding this comment.
Let's move this into a header (like signature.h) and use it from there. This same pattern is duplicated at top of signature.c. That seems better overall, but I am okay with this PR as-is if needed.
Contributor
Author
There was a problem hiding this comment.
Move WC_SIG_MIN_HASH_TYPE default into signature.h.
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.
Description
test_wc_SignatureDecisionCoverage asserts that SHA-1 input is rejected
by wc_SignatureVerify/Generate, assuming the default
SHA-256 hash strength floor. A build may lower the floor - configuring
with --enable-wolfclu.
Fixes zd#22151
Testing
fixed test_wc_SignatureGetSize_ecc
Checklist