Skip to content

Rust wrapper: Minor fixes and edits to support FIPS v5.2.3 module - #11895

Open
gasbytes wants to merge 2 commits into
wolfSSL:masterfrom
gasbytes:rust-wrapper-fips-fixes-v5
Open

gasbytes wants to merge 2 commits into
wolfSSL:masterfrom
gasbytes:rust-wrapper-fips-fixes-v5

Conversation

@gasbytes

Copy link
Copy Markdown
Contributor

Description

Extended the logic to handle the renaming of some functions for v5, used when the module exports a different symbol for the standard name, made sure it runs once per build and is cached. Added a layer around wc_HKDF_Extract (since wc_HKDF_Extract_ex doesn't exist on v5 modules) and wc_HKDF_Expand. Did the same for wc_rng_new.
Also did some module-specific gating and fixes, and updated some tests too.

Testing

Tested against the crate's testsuite and the rustls provider. On v5.2.3, wc_RsaPSS_VerifyCheck has no crate test and is only covered by the provider's tests.

@gasbytes
gasbytes requested a balanced review from Copilot October 26, 2026 15:02
@gasbytes gasbytes self-assigned this Oct 26, 2026

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@gasbytes
gasbytes marked this pull request as ready for review October 26, 2026 15:45
@github-actions

Copy link
Copy Markdown

retest this please

return Err(rc);
}
}
Ok(())

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.

This function just returns Ok(()) without doing anything with FIPS v5.2.3? That does not seem great. If it is still going to exist in that configuration, should it return an error instead?

@gasbytes gasbytes Oct 27, 2026 •

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.

On v5.2.3 the FIPS settings turn RSA blinding off entirely, so there's nothing for the RNG to attach to and decryption doesn't need one, I think returning an error would only break callers, so it succeeds as a no-op.
But I think the comment can be a little bit more explicit, thanks.

@gasbytes
gasbytes force-pushed the rust-wrapper-fips-fixes-v5 branch from 42b4e35 to 0cb812f Compare October 27, 2026 09:17
@gasbytes
gasbytes force-pushed the rust-wrapper-fips-fixes-v5 branch from 0cb812f to 9dbe646 Compare October 27, 2026 09:56
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