mirror of
https://github.com/openssl/openssl.git
synced 2025-01-30 14:01:55 +08:00
Workaround egd rand source deficiencies
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 https://github.com/openssl/openssl/pull/19454)
(cherry picked from commit 0b3fec5022
)
This commit is contained in:
parent
fb03e61459
commit
04d07ffbed
@ -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 */
|
||||
@ -895,7 +895,7 @@ err:
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user