Skip to content

Fix privSz for wp_dh_get_params#251

Merged
padelsbach merged 2 commits into
wolfSSL:masterfrom
aidangarske:wp-dh-privSz-fix
Aug 7, 2025
Merged

Fix privSz for wp_dh_get_params#251
padelsbach merged 2 commits into
wolfSSL:masterfrom
aidangarske:wp-dh-privSz-fix

Conversation

@aidangarske

@aidangarske aidangarske commented Aug 6, 2025

Copy link
Copy Markdown
Member

Description

  • wp_dh_get_params was returning the pub key size when it should return the private key size here.
  • Added a test case for NULL data entries for size queries. Before we where not actually hitting this line in the unit test.
  • Private key size queries with NULL where actually failing as well like this:
#### Start: 57 - test_dh_get_params
MSG: EVP_PKEY_get_params failed for param priv in mode Null data (WolfProvider (0))
#### FAILED: 57 - test_dh_get_params (err: 1)

@aidangarske
aidangarske requested a review from padelsbach August 6, 2025 20:40
@aidangarske aidangarske self-assigned this Aug 6, 2025
@padelsbach

Copy link
Copy Markdown
Contributor

Good catch!

@padelsbach

Copy link
Copy Markdown
Contributor

Is there a test case we should add for this?

@aidangarske
aidangarske marked this pull request as ready for review August 6, 2025 23:49

@padelsbach padelsbach left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice job

@padelsbach
padelsbach merged commit e773a7d into wolfSSL:master Aug 7, 2025
282 checks passed
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