-
Notifications
You must be signed in to change notification settings - Fork 897
Improvements to RNG and compatibility layer #8867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements improvements to the RNG by incorporating process ID (getpid) checks to detect forking and trigger a reseed, and it adjusts the compatibility layer and configuration accordingly.
- Added a new pid field in WC_RNG and integrated getpid-based reseeding in random.c.
- Updated tests to verify correct RNG behavior after forking.
- Modified ssl.c, configure.ac, CMakeLists.txt, and GitHub workflow files to support the new functionality.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
wolfssl/wolfcrypt/random.h | Added a conditionally compiled pid field to WC_RNG. |
wolfcrypt/src/random.c | Integrated getpid checks and a PollAndReSeed call for reseeding. |
tests/api.c | Extended tests to verify reseeding behavior after forking. |
src/ssl.c | Updated RNG initialization and reseed checks in FIPS-related code. |
configure.ac | Added getpid to the function and declaration checks. |
CMakeLists.txt | Added a check for getpid function availability. |
.github/workflows/os-check.yml | Updated build flags to include new macros (with potential quoting issues). |
Retest this please Jenkins |
ZD#20016