Gate SHA3-224/256/384/512 prototypes separately - #11157
Open
holtrop-wolfssl wants to merge 1 commit into
Open
Conversation
Rust wrapper: detect SHA3-224/256/384/512 build options separately. Fixes F-8297.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines SHA3 feature detection and exposure so SHA3-224/256/384/512 can be enabled/disabled independently, aligning the C header prototypes with per-variant build options and updating the Rust wrapper to match.
Changes:
- Gate SHA3-224/256/384/512 C API prototypes individually in
wolfssl/wolfcrypt/sha3.husingWOLFSSL_NOSHA3_{224,256,384,512}. - Update the Rust wrapper to use per-variant
cfg(sha3_*)for SHA3 types/traits/HMAC/RSA hash constants. - Update Rust tests to compile/run per SHA3 variant (
#[cfg(sha3_224)], etc.) instead of a singlesha3cfg.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| wrapper/rust/wolfssl-wolfcrypt/tests/test_sha.rs | Gates each SHA3 test by the specific SHA3 variant cfg. |
| wrapper/rust/wolfssl-wolfcrypt/tests/test_sha_digest.rs | Gates each SHA3 Digest-trait test by the specific SHA3 variant cfg. |
| wrapper/rust/wolfssl-wolfcrypt/src/sha.rs | Gates each SHA3 context type and impl by the matching sha3_* cfg. |
| wrapper/rust/wolfssl-wolfcrypt/src/sha_digest.rs | Gates Digest-trait impls per SHA3 variant. |
| wrapper/rust/wolfssl-wolfcrypt/src/rsa.rs | Gates SHA3 hash-type constants per SHA3 variant. |
| wrapper/rust/wolfssl-wolfcrypt/src/hmac_mac.rs | Gates SHA3 HMAC MAC wrappers per SHA3 variant. |
| wrapper/rust/wolfssl-wolfcrypt/build.rs | Detects and emits sha3_224/256/384/512 cfg flags separately via symbol scanning. |
| wolfssl/wolfcrypt/sha3.h | Adds per-variant preprocessor gates around SHA3 function prototypes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
|
retest this please (Retry trigger not found - ABORTED) |
Contributor
Author
|
retest this please (Timeout has been exceeded; ABORTED) |
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
Gate SHA3-224/256/384/512 prototypes separately
Rust wrapper: detect SHA3-224/256/384/512 build options separately.
Fixes F-8297.
Testing
How did you test?
Checklist