Open
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #344
Scan targets checked: wolfhsm-crypto-bugs, wolfhsm-src
Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds asynchronous (split Request/Response) APIs for RNG generation, including a DMA variant, and updates docs/tests to cover the new async behavior.
Changes:
- Introduces async RNG Request/Response APIs (non-DMA and DMA) and refactors blocking wrappers to use them.
- Defines a max inline RNG payload size for single comm-buffer replies and documents caller-driven chunking.
- Extends crypto tests to directly exercise async RNG flows (including DMA).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| wolfhsm/wh_message_crypto.h | Adds inline payload size cap macro for RNG responses. |
| wolfhsm/wh_client_crypto.h | Declares new async RNG APIs and documents usage/constraints. |
| wolfhsm/wh_client.h | Adds per-operation async DMA stash for RNG to support POST cleanup. |
| src/wh_client_crypto.c | Implements async RNG APIs, refactors blocking wrappers; adds DMA async request/response split. |
| test/wh_test_crypto.c | Adds direct async RNG and async DMA RNG tests. |
| docs/draft/async-crypto.md | Documents RNG async design, chunking policy, and API reference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8c98762 to
21c77cd
Compare
df4c0d8 to
8fc1e4b
Compare
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.
Async support for RNG.
Request()/Response()split to RNG generate, following the pattern established by the SHA async PR.wh_Client_RngGenerate{,Dma}are retained as thin wrappers over the new primitives, so existing callers (including the wolfCrypt RNG callback path) are unchanged.