0001-Revert-apple-getentropy-removal.patch 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 8b9e95ae8a9d81b1942be28cba95c35f2303ee2d Mon Sep 17 00:00:00 2001
  2. From: Matthew Finkel <sysrqb@torproject.org>
  3. Date: Fri, 3 Sep 2021 20:48:53 +0000
  4. Subject: [PATCH] Revert "apple getentropy removal"
  5. This reverts commit b58ac9f1e3f828b5c65c9edd5bb86603a4886a26.
  6. ---
  7. crypto/rand/rand_unix.c | 8 --------
  8. 1 file changed, 8 deletions(-)
  9. diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c
  10. index 43f1069d15..2dfced2052 100644
  11. --- a/crypto/rand/rand_unix.c
  12. +++ b/crypto/rand/rand_unix.c
  13. @@ -34,9 +34,6 @@
  14. #if defined(__OpenBSD__)
  15. # include <sys/param.h>
  16. #endif
  17. -#if defined(__APPLE__)
  18. -# include <CommonCrypto/CommonRandom.h>
  19. -#endif
  20. #if defined(OPENSSL_SYS_UNIX) || defined(__DJGPP__)
  21. # include <sys/types.h>
  22. @@ -381,11 +378,6 @@ static ssize_t syscall_random(void *buf, size_t buflen)
  23. if (errno != ENOSYS)
  24. return -1;
  25. }
  26. -# elif defined(__APPLE__)
  27. - if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess)
  28. - return (ssize_t)buflen;
  29. -
  30. - return -1;
  31. # else
  32. union {
  33. void *p;
  34. --
  35. 2.25.1