]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
rand: remove unimplemented librandom stub code
authorDimitri John Ledkov <dimitri.ledkov@surgut.co.uk>
Wed, 22 May 2024 19:05:07 +0000 (20:05 +0100)
committerTomas Mraz <tomas@openssl.org>
Fri, 24 May 2024 10:03:21 +0000 (12:03 +0200)
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)

Configure
INSTALL.md
crypto/info.c
providers/implementations/rands/seeding/rand_unix.c

index 75f3f720f9fcf8e55978d6516ad731062c767ebd..c15f5b2fffe267effb165e3ca6493df14d0f9b8e 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -816,7 +816,7 @@ my %cmdvars = ();               # Stores FOO='blah' type arguments
 my %unsupported_options = ();
 my %deprecated_options = ();
 # 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 = ();
 while (@argvcopy)
         {
index 8e56ed4a075606db81d1f12c2c99eff850f53a63..2060973ec2349b47b37e6743116e5d62bc3f1811 100644 (file)
@@ -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
 if provided by the CPU.
 
-### librandom
-
-Use librandom (not implemented yet).
-This source is ignored by the FIPS provider.
-
 ### none
 
 Disable automatic seeding.  This is the default on some operating systems where
index 3c74fd58e0de62355d38048dbb215d9c26b2edc7..c823283279ba9837e9243f5fd48168314220f32c 100644 (file)
@@ -171,9 +171,6 @@ DEFINE_RUN_ONCE_STATIC(init_info_strings)
         add_seeds_string("rdrand ( rdseed rdrand )");
 # endif
 #endif
-#ifdef OPENSSL_RAND_SEED_LIBRANDOM
-        add_seeds_string("C-library-random");
-#endif
 #ifdef OPENSSL_RAND_SEED_GETRANDOM
         add_seeds_string("getrandom-syscall");
 #endif
index 9a936d800d418388f8601cb9bd2cb6cfbe93d774..8c63a3056035a216d963acdcf4519ba14d9e031e 100644 (file)
@@ -95,7 +95,6 @@ static uint64_t get_time_stamp(void);
 /* none means none. this simplifies the following logic */
 # undef OPENSSL_RAND_SEED_OS
 # undef OPENSSL_RAND_SEED_GETRANDOM
-# undef OPENSSL_RAND_SEED_LIBRANDOM
 # undef OPENSSL_RAND_SEED_DEVRANDOM
 # undef OPENSSL_RAND_SEED_RDTSC
 # undef OPENSSL_RAND_SEED_RDCPU
@@ -207,10 +206,6 @@ void ossl_rand_pool_keep_random_devices_open(int keep)
 #   define OPENSSL_RAND_SEED_DEVRANDOM
 #  endif
 
-#  if defined(OPENSSL_RAND_SEED_LIBRANDOM)
-#   error "librandom not (yet) supported"
-#  endif
-
 #  if (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(KERN_ARND)
 /*
  * 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;
 #   endif
 
-#   if defined(OPENSSL_RAND_SEED_LIBRANDOM)
-    {
-        /* Not yet implemented. */
-    }
-#   endif
-
 #   if defined(OPENSSL_RAND_SEED_DEVRANDOM)
     if (wait_random_seeded()) {
         size_t bytes_needed;