summaryrefslogtreecommitdiffstats
path: root/test/drbgtest.c
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2022-10-20 16:14:29 +0200
committerTomas Mraz <tomas@openssl.org>2022-10-24 12:00:47 +0200
commit0b3fec502298f9a16889d2507948a916416e71cf (patch)
tree17b8231003ea18b77b8549986dd8a89cb85f4c6e /test/drbgtest.c
parent3e9ce25c6a312300e446690e87b6231bedf727e0 (diff)
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)
Diffstat (limited to 'test/drbgtest.c')
-rw-r--r--test/drbgtest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/drbgtest.c b/test/drbgtest.c
index a1a786218b..b5122b60bd 100644
--- a/test/drbgtest.c
+++ b/test/drbgtest.c
@@ -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);