[openssl] master update
Dr. Paul Dale
pauli at openssl.org
Tue Jun 29 09:03:53 UTC 2021
The branch master has been updated
via f0b9e75e4f9d6ae74389cd1b019b77cf2bd01033 (commit)
from 19c0b46b83335b36a9816abef4e82f74863a4e0a (commit)
- Log -----------------------------------------------------------------
commit f0b9e75e4f9d6ae74389cd1b019b77cf2bd01033
Author: David CARLIER <devnexen at gmail.com>
Date: Sat Jun 26 14:12:38 2021 +0100
darwin platform replacing getentropy usage by platform api instead.
Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15924)
-----------------------------------------------------------------------
Summary of changes:
providers/implementations/rands/seeding/rand_unix.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/providers/implementations/rands/seeding/rand_unix.c b/providers/implementations/rands/seeding/rand_unix.c
index 2e6429344c..eab08a8150 100644
--- a/providers/implementations/rands/seeding/rand_unix.c
+++ b/providers/implementations/rands/seeding/rand_unix.c
@@ -40,6 +40,9 @@
# include <sys/param.h>
# include <sys/random.h>
#endif
+#if defined(__APPLE__)
+# include <CommonCrypto/CommonRandom.h>
+#endif
#if (defined(OPENSSL_SYS_UNIX) && !defined(OPENSSL_SYS_VXWORKS)) \
|| defined(__DJGPP__)
@@ -366,6 +369,12 @@ static ssize_t syscall_random(void *buf, size_t buflen)
if (errno != ENOSYS)
return -1;
}
+# elif defined(__APPLE__)
+
+ if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess)
+ return (ssize_t)buflen;
+
+ return -1;
# else
union {
void *p;
More information about the openssl-commits
mailing list