mirror of
https://github.com/openssl/openssl.git
synced 2025-02-17 14:32:04 +08:00
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:
parent
3121425830
commit
7f791b25eb
@ -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);
|
||||
|
@ -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
|
||||
/*
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user