Skip to content

Commit

Permalink
Workaround egd rand source deficiencies
Browse files Browse the repository at this point in the history
With egd as the rand source the reseed after fork confuses the egd.

Fixes #19396

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #19454)
  • Loading branch information
t8m committed Oct 24, 2022
1 parent 3e9ce25 commit 0b3fec5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/drbgtest.c
Expand Up @@ -277,7 +277,7 @@ static int test_drbg_reseed(int expect_success,
}


#if defined(OPENSSL_SYS_UNIX)
#if defined(OPENSSL_SYS_UNIX) && !defined(OPENSSL_RAND_SEED_EGD)
/* number of children to fork */
#define DRBG_FORK_COUNT 9
/* two results per child, two for the parent */
Expand Down Expand Up @@ -895,7 +895,7 @@ static int test_rand_prediction_resistance(void)
int setup_tests(void)
{
ADD_TEST(test_rand_reseed);
#if defined(OPENSSL_SYS_UNIX)
#if defined(OPENSSL_SYS_UNIX) && !defined(OPENSSL_RAND_SEED_EGD)
ADD_ALL_TESTS(test_rand_fork_safety, RANDOM_SIZE);
#endif
ADD_TEST(test_rand_prediction_resistance);
Expand Down

0 comments on commit 0b3fec5

Please sign in to comment.