Skip to content

Conversation

JacobBarthelmeh
Copy link
Contributor

ZD#20016

@JacobBarthelmeh JacobBarthelmeh requested a review from Copilot June 10, 2025 22:14
@JacobBarthelmeh JacobBarthelmeh self-assigned this Jun 10, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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).

@JacobBarthelmeh
Copy link
Contributor Author

Retest this please Jenkins

@dgarske dgarske merged commit 6571f42 into wolfSSL:master Jun 11, 2025
150 checks passed
dgarske added a commit to dgarske/wolfssl that referenced this pull request Jun 13, 2025
holtrop pushed a commit to holtrop/wolfssl that referenced this pull request Jun 16, 2025
JeremiahM37 pushed a commit to JeremiahM37/wolfssl that referenced this pull request Jun 20, 2025
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