rand: fix CPU and timer sources.

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/12267)
This commit is contained in:
Pauli 2020-06-25 07:46:36 +10:00
parent 3121425830
commit 7f791b25eb
4 changed files with 6 additions and 4 deletions

View File

@ -10,6 +10,7 @@
#include "internal/cryptlib.h"
#include <openssl/opensslconf.h>
#include "prov/rand_pool.h"
#include "prov/seeding.h"
#ifdef OPENSSL_RAND_SEED_RDCPU
size_t OPENSSL_ia32_rdseed_bytes(unsigned char *buf, size_t len);

View File

@ -10,6 +10,7 @@
#include "internal/cryptlib.h"
#include <openssl/opensslconf.h>
#include "prov/rand_pool.h"
#include "prov/seeding.h"
#ifdef OPENSSL_RAND_SEED_RDTSC
/*

View File

@ -684,13 +684,13 @@ size_t prov_pool_acquire_entropy(RAND_POOL *pool)
# endif
# if defined(OPENSSL_RAND_SEED_RDTSC)
entropy_available = rand_acquire_entropy_from_tsc(pool);
entropy_available = prov_acquire_entropy_from_tsc(pool);
if (entropy_available > 0)
return entropy_available;
# endif
# if defined(OPENSSL_RAND_SEED_RDCPU)
entropy_available = rand_acquire_entropy_from_cpu(pool);
entropy_available = prov_acquire_entropy_from_cpu(pool);
if (entropy_available > 0)
return entropy_available;
# endif

View File

@ -53,13 +53,13 @@ size_t prov_pool_acquire_entropy(RAND_POOL *pool)
# ifdef OPENSSL_RAND_SEED_RDTSC
entropy_available = rand_acquire_entropy_from_tsc(pool);
entropy_available = prov_acquire_entropy_from_tsc(pool);
if (entropy_available > 0)
return entropy_available;
# endif
# ifdef OPENSSL_RAND_SEED_RDCPU
entropy_available = rand_acquire_entropy_from_cpu(pool);
entropy_available = prov_acquire_entropy_from_cpu(pool);
if (entropy_available > 0)
return entropy_available;
# endif