Skip to content

20261023-rng-nits - #11882

Merged
philljj merged 1 commit into
wolfSSL:masterfrom
douzzer:20261023-rng-nits
Oct 26, 2026
Merged

philljj merged 1 commit into
wolfSSL:masterfrom
douzzer:20261023-rng-nits

Conversation

@douzzer

@douzzer douzzer commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

wolfcrypt/src/random.c: cosmetic fixes:

  • fix stale Hash_DRBG_StirGenerate() comment (Hash_gen()/Hash512_gen() discard the zero-length block; nothing is banked for a continuous test);

  • log failed wc_FreeMutex()/wc_UnLockMutex() in RngAutoLockFree()/RngAutoLockExit() via WOLFSSL_MSG() instead of discarding the retval.

(adopts fixes from #11850)

* fix stale Hash_DRBG_StirGenerate() comment (Hash_gen()/Hash512_gen() discard the zero-length block; nothing is banked for a continuous test);

* log failed wc_FreeMutex()/wc_UnLockMutex() in RngAutoLockFree()/RngAutoLockExit() via WOLFSSL_MSG() instead of discarding the retval.
@douzzer
douzzer requested a review from wolfSSL-Bot October 23, 2026 20:11
Copilot AI balanced review requested due to automatic review settings October 23, 2026 20:11

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.

🟢 Approval recommended

The changes are limited to diagnostics and a comment correction, with no unresolved review findings.

No open issues 🎉

What changed in this PR

This PR makes a small RNG cleanup, adopting diagnostic and comment fixes from #11850 without changing DRBG behavior.

Changes:

  • Log mutex free and unlock failures through WOLFSSL_MSG().
  • Correct the stirring comment to explain that zero-length generation discards the generated block rather than retaining it for a continuous test.
File Description
wolfcrypt/​src/​random.c Adds mutex failure diagnostics and corrects the Hash_DRBG_StirGenerate() comment.

Review effort: Balanced

@philljj philljj self-assigned this Oct 26, 2026
@philljj
philljj merged commit 12636fe into wolfSSL:master Oct 26, 2026
430 of 433 checks passed
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