diff options
author | Pauli <paul.dale@oracle.com> | 2020-06-25 07:46:36 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-06-30 09:47:57 +1000 |
commit | 7f791b25eb092ec78ff62e944ac3096c8d2f9311 (patch) | |
tree | eee38ea5e96604cd63399606ce98aa1e06f2039f /providers | |
parent | 31214258309251aff297da67a60a6b60bf4ef27e (diff) |
rand: fix CPU and timer sources.
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/12267)
Diffstat (limited to 'providers')
4 files changed, 6 insertions, 4 deletions
diff --git a/providers/implementations/rands/seeding/rand_cpu_x86.c b/providers/implementations/rands/seeding/rand_cpu_x86.c index ba0f716426..fd47de9ad0 100644 --- a/providers/implementations/rands/seeding/rand_cpu_x86.c +++ b/providers/implementations/rands/seeding/rand_cpu_x86.c @@ -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); diff --git a/providers/implementations/rands/seeding/rand_tsc.c b/providers/implementations/rands/seeding/rand_tsc.c index dd69aa438f..520f140fdf 100644 --- a/providers/implementations/rands/seeding/rand_tsc.c +++ b/providers/implementations/rands/seeding/rand_tsc.c @@ -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 /* diff --git a/providers/implementations/rands/seeding/rand_unix.c b/providers/implementations/rands/seeding/rand_unix.c index 77c5d26142..69fa3f841e 100644 --- a/providers/implementations/rands/seeding/rand_unix.c +++ b/providers/implementations/rands/seeding/rand_unix.c @@ -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 diff --git a/providers/implementations/rands/seeding/rand_win.c b/providers/implementations/rands/seeding/rand_win.c index a576109f6c..d820d3e395 100644 --- a/providers/implementations/rands/seeding/rand_win.c +++ b/providers/implementations/rands/seeding/rand_win.c @@ -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 |