Don't include the DEVRANDOM being seeded logic on Android.
authorPauli <paul.dale@oracle.com>
Thu, 29 Aug 2019 21:38:58 +0000 (07:38 +1000)
committerPauli <paul.dale@oracle.com>
Thu, 29 Aug 2019 22:02:33 +0000 (08:02 +1000)
It lacks exposure of the `shm*` functions and should prefer the GETRANDOM
source.

Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/9735)

(cherry picked from commit 280cc0180862ae6664b88d5ea12cb5f599000d36)

e_os.h

diff --git a/e_os.h b/e_os.h
index fe4c0912bc1d3a9f80f4e583484c481d55b6e330..858bc40cb1fcedcbf77875be472c188a29832850 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -28,7 +28,7 @@
  * default, we will try to read at least one of these files
  */
 #  define DEVRANDOM "/dev/urandom", "/dev/random", "/dev/hwrng", "/dev/srandom"
-#  ifdef __linux
+#  if defined(__linux) && !defined(__ANDROID__)
 #   ifndef DEVRANDOM_WAIT
 #    define DEVRANDOM_WAIT   "/dev/random"
 #   endif