Skip to content

Conversation

@L-series
Copy link
Contributor

@L-series L-series commented Dec 1, 2025

  • API: add failure mode support for randombytes()
  • autogen: run to update randombytes declaration
  • randombytes: add example to test failure

@L-series L-series requested a review from a team as a code owner December 1, 2025 22:01
Change randombytes() to return int (0 on success, non-zero on failure)
instead of void, allowing callers to detect and handle RNG failures.

Updated function signature, all call sites to check return
values and test files to use CHECK macro.

Signed-off-by: Andreas Hatziiliou <andreas.hatziiliou@savoirfairelinux.com>
Run the autogen script to reflect the changes made to the randombytes()
API.

Signed-off-by: Andreas Hatziiliou <andreas.hatziiliou@savoirfairelinux.com>
This commit introduces a new example build which is meant to
test the failure mode to the randombytes API. The
randombytes_force_failure(n) function ensures that the nth call
to randombytes will fail.

Signed-off-by: Andreas Hatziiliou <andreas.hatziiliou@savoirfairelinux.com>
@L-series L-series marked this pull request as draft December 1, 2025 23:04
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.

2 participants