[openssl] master update

Richard Levitte levitte at openssl.org
Tue Nov 17 12:17:30 UTC 2020


The branch master has been updated
       via  ef2a44eb31c88b47bca914295b229a9bd1658145 (commit)
      from  ccbf3f90c46cee9b2ca38f9a6c797c838738d8af (commit)


- Log -----------------------------------------------------------------
commit ef2a44eb31c88b47bca914295b229a9bd1658145
Author: David Carlier <devnexen at gmail.com>
Date:   Mon Nov 16 11:02:24 2020 +0000

    NetBSD build fix.
    
    getentropy shows up wrongly as weak symbol whereas there is no support.
    
    However NetBSD 10.0 will support getrandom.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/13408)

-----------------------------------------------------------------------

Summary of changes:
 providers/implementations/rands/seeding/rand_unix.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/providers/implementations/rands/seeding/rand_unix.c b/providers/implementations/rands/seeding/rand_unix.c
index 75ce8e828d..3696688dd2 100644
--- a/providers/implementations/rands/seeding/rand_unix.c
+++ b/providers/implementations/rands/seeding/rand_unix.c
@@ -383,7 +383,7 @@ static ssize_t syscall_random(void *buf, size_t buflen)
      * Note: Sometimes getentropy() can be provided but not implemented
      * internally. So we need to check errno for ENOSYS
      */
-#  if !defined(__DragonFly__)
+#  if !defined(__DragonFly__) && !defined(__NetBSD__)
 #    if defined(__GNUC__) && __GNUC__>=2 && defined(__ELF__) && !defined(__hpux)
     extern int getentropy(void *buffer, size_t length) __attribute__((weak));
 
@@ -416,7 +416,8 @@ static ssize_t syscall_random(void *buf, size_t buflen)
     return syscall(__NR_getrandom, buf, buflen, 0);
 #  elif (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(KERN_ARND)
     return sysctl_random(buf, buflen);
-#  elif (defined(__DragonFly__)  && __DragonFly_version >= 500700)
+#  elif (defined(__DragonFly__)  && __DragonFly_version >= 500700) \
+     || (defined(__NetBSD__) && __NetBSD_Version >= 1000000000)
     return getrandom(buf, buflen, 0);
 #  else
     errno = ENOSYS;


More information about the openssl-commits mailing list