Skip to content

Honor WC_SIG_MIN_HASH_TYPE override in signature decision test - #11026

Open
kojo1 wants to merge 2 commits into
wolfSSL:masterfrom
kojo1:sig_min_hash_test
Open

Honor WC_SIG_MIN_HASH_TYPE override in signature decision test#11026
kojo1 wants to merge 2 commits into
wolfSSL:masterfrom
kojo1:sig_min_hash_test

Conversation

@kojo1

@kojo1 kojo1 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

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

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

@kojo1
kojo1 requested a review from wolfSSL-Bot July 31, 2026 10:23

@dgarske dgarske left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also double check the PR description which indicates "test_wc_SignatureGetSize_ecc", but no code changes in it.

Comment thread tests/api/test_signature.c Outdated
/* 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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move WC_SIG_MIN_HASH_TYPE default into signature.h.

@kojo1
kojo1 requested a review from dgarske August 2, 2026 13:03
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.

3 participants