diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c index 4710dbb2d1019ae1d9f5f57d05c4ee939b4ce41a..4b91903f20d69b4d65322e4a4d0f14b68dea4281 100644 --- a/crypto/rand/rand_unix.c +++ b/crypto/rand/rand_unix.c @@ -510,29 +510,6 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool) bytes_needed = rand_pool_bytes_needed(pool, 1 /*entropy_factor*/); { size_t i; -#ifdef DEVRANDOM_WAIT - static int wait_done = 0; - - /* - * On some implementations reading from /dev/urandom is possible - * before it is initialized. Therefore we wait for /dev/random - * to be readable to make sure /dev/urandom is initialized. - */ - if (!wait_done && bytes_needed > 0) { - int f = open(DEVRANDOM_WAIT, O_RDONLY); - - if (f >= 0) { - fd_set fds; - - FD_ZERO(&fds); - FD_SET(f, &fds); - while (select(f+1, &fds, NULL, NULL, NULL) < 0 - && errno == EINTR); - close(f); - } - wait_done = 1; - } -#endif for (i = 0; bytes_needed > 0 && i < OSSL_NELEM(random_device_paths); i++) { ssize_t bytes = 0; diff --git a/e_os.h b/e_os.h index e9ce6c9cc8b9b04ce807f3644aa0f05da371cd73..513ea2dfe47200c1a5ad72b63613fd964a18f96a 100644 --- a/e_os.h +++ b/e_os.h @@ -28,9 +28,6 @@ * default, we will try to read at least one of these files */ # define DEVRANDOM "/dev/urandom", "/dev/random", "/dev/hwrng", "/dev/srandom" -# ifdef __linux -# define DEVRANDOM_WAIT "/dev/random" -# endif # endif # if !defined(OPENSSL_NO_EGD) && !defined(DEVRANDOM_EGD) /*