mirror of https://github.com/openssl/openssl.git
rand: remove unimplemented librandom stub code
Clean up of unsuable / no-op code. Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24465)
This commit is contained in:
parent
46f55238d2
commit
05faa4ffee
|
@ -816,7 +816,7 @@ my %cmdvars = (); # Stores FOO='blah' type arguments
|
||||||
my %unsupported_options = ();
|
my %unsupported_options = ();
|
||||||
my %deprecated_options = ();
|
my %deprecated_options = ();
|
||||||
# If you change this, update apps/version.c
|
# If you change this, update apps/version.c
|
||||||
my @known_seed_sources = qw(getrandom devrandom os egd none rdcpu librandom);
|
my @known_seed_sources = qw(getrandom devrandom os egd none rdcpu);
|
||||||
my @seed_sources = ();
|
my @seed_sources = ();
|
||||||
while (@argvcopy)
|
while (@argvcopy)
|
||||||
{
|
{
|
||||||
|
|
|
@ -510,11 +510,6 @@ This source is ignored by the FIPS provider.
|
||||||
Use the `RDSEED` or `RDRAND` command on x86 or `RNDRRS` command on aarch64
|
Use the `RDSEED` or `RDRAND` command on x86 or `RNDRRS` command on aarch64
|
||||||
if provided by the CPU.
|
if provided by the CPU.
|
||||||
|
|
||||||
### librandom
|
|
||||||
|
|
||||||
Use librandom (not implemented yet).
|
|
||||||
This source is ignored by the FIPS provider.
|
|
||||||
|
|
||||||
### none
|
### none
|
||||||
|
|
||||||
Disable automatic seeding. This is the default on some operating systems where
|
Disable automatic seeding. This is the default on some operating systems where
|
||||||
|
|
|
@ -171,9 +171,6 @@ DEFINE_RUN_ONCE_STATIC(init_info_strings)
|
||||||
add_seeds_string("rdrand ( rdseed rdrand )");
|
add_seeds_string("rdrand ( rdseed rdrand )");
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef OPENSSL_RAND_SEED_LIBRANDOM
|
|
||||||
add_seeds_string("C-library-random");
|
|
||||||
#endif
|
|
||||||
#ifdef OPENSSL_RAND_SEED_GETRANDOM
|
#ifdef OPENSSL_RAND_SEED_GETRANDOM
|
||||||
add_seeds_string("getrandom-syscall");
|
add_seeds_string("getrandom-syscall");
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -95,7 +95,6 @@ static uint64_t get_time_stamp(void);
|
||||||
/* none means none. this simplifies the following logic */
|
/* none means none. this simplifies the following logic */
|
||||||
# undef OPENSSL_RAND_SEED_OS
|
# undef OPENSSL_RAND_SEED_OS
|
||||||
# undef OPENSSL_RAND_SEED_GETRANDOM
|
# undef OPENSSL_RAND_SEED_GETRANDOM
|
||||||
# undef OPENSSL_RAND_SEED_LIBRANDOM
|
|
||||||
# undef OPENSSL_RAND_SEED_DEVRANDOM
|
# undef OPENSSL_RAND_SEED_DEVRANDOM
|
||||||
# undef OPENSSL_RAND_SEED_RDTSC
|
# undef OPENSSL_RAND_SEED_RDTSC
|
||||||
# undef OPENSSL_RAND_SEED_RDCPU
|
# undef OPENSSL_RAND_SEED_RDCPU
|
||||||
|
@ -207,10 +206,6 @@ void ossl_rand_pool_keep_random_devices_open(int keep)
|
||||||
# define OPENSSL_RAND_SEED_DEVRANDOM
|
# define OPENSSL_RAND_SEED_DEVRANDOM
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if defined(OPENSSL_RAND_SEED_LIBRANDOM)
|
|
||||||
# error "librandom not (yet) supported"
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# if (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(KERN_ARND)
|
# if (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(KERN_ARND)
|
||||||
/*
|
/*
|
||||||
* sysctl_random(): Use sysctl() to read a random number from the kernel
|
* sysctl_random(): Use sysctl() to read a random number from the kernel
|
||||||
|
@ -659,12 +654,6 @@ size_t ossl_pool_acquire_entropy(RAND_POOL *pool)
|
||||||
return entropy_available;
|
return entropy_available;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if defined(OPENSSL_RAND_SEED_LIBRANDOM)
|
|
||||||
{
|
|
||||||
/* Not yet implemented. */
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# if defined(OPENSSL_RAND_SEED_DEVRANDOM)
|
# if defined(OPENSSL_RAND_SEED_DEVRANDOM)
|
||||||
if (wait_random_seeded()) {
|
if (wait_random_seeded()) {
|
||||||
size_t bytes_needed;
|
size_t bytes_needed;
|
||||||
|
|
Loading…
Reference in New Issue