Skip to content

wc_ecc_cmp_param cleanup#7365

Merged
douzzer merged 1 commit intowolfSSL:masterfrom
rizlik:ecc_cmp_param_cleanup
Mar 29, 2024
Merged

wc_ecc_cmp_param cleanup#7365
douzzer merged 1 commit intowolfSSL:masterfrom
rizlik:ecc_cmp_param_cleanup

Conversation

@rizlik
Copy link
Copy Markdown
Contributor

@rizlik rizlik commented Mar 26, 2024

Description

The XSTRNCMP returns 0 (equality) also if param matches only paramSz characters of curveParam. Eg: a comparison with paramSz == 0 will always return equality.
Another side note is that the function returns -1 for inequality when using WC_TYPE_UNSIGNED_BIN , but it uses the return of XSTRNCMP directly when using WC_TYPE_HEX_STR.
This PR fixes both.

@douzzer douzzer merged commit 3f3dd47 into wolfSSL:master Mar 29, 2024
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.

4 participants