pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/openssl Apply upstream c023d98dcf2ba1cc30f545...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7ac5346f4953
branches:  trunk
changeset: 371655:7ac5346f4953
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Tue Jan 11 13:54:01 2022 +0000

description:
Apply upstream c023d98dcf2ba1cc30f545ae54d0e037e80a8794:
Darwin platform allows to build on releases before Yosemite/ios 8.
Fixes build on Snow Leopard. Still builds on Monterey.

diffstat:

 security/openssl/distinfo                               |   5 +-
 security/openssl/patches/patch-crypto_rand_rand__unix.c |  28 ++++++++++++----
 security/openssl/patches/patch-include_crypto_rand.h    |  24 ++++++++++++++
 3 files changed, 47 insertions(+), 10 deletions(-)

diffs (82 lines):

diff -r 921b9308bb73 -r 7ac5346f4953 security/openssl/distinfo
--- a/security/openssl/distinfo Tue Jan 11 13:02:56 2022 +0000
+++ b/security/openssl/distinfo Tue Jan 11 13:54:01 2022 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.155 2022/01/11 11:10:39 schmonz Exp $
+$NetBSD: distinfo,v 1.156 2022/01/11 13:54:01 schmonz Exp $
 
 BLAKE2s (openssl-1.1.1l.tar.gz) = a011562eff4d77dab8d1e80753fa06cb87945783b4dd9ca111e37a59209f1df6
 SHA512 (openssl-1.1.1l.tar.gz) = d9611f393e37577cca05004531388d3e0ebbf714894cab9f95f4903909cd4f45c214faab664c0cbc3ad3cca309d500b9e6d0ecbf9a0a0588d1677dc6b047f9e0
@@ -6,4 +6,5 @@
 SHA1 (patch-Configurations_shared-info.pl) = 0e835f6e343b5d05ef9a0e6ef2a195201262d15c
 SHA1 (patch-Configurations_unix-Makefile.tmpl) = 3f47dd453381485aeb6c37dc53f932428fdcef50
 SHA1 (patch-Configure) = 479f1bc826f7721f6b44d6b5a6cf460432924bf2
-SHA1 (patch-crypto_rand_rand__unix.c) = 758489083f8698cb725e4c2b93a21cfa650c715c
+SHA1 (patch-crypto_rand_rand__unix.c) = 41b7cce4f31021080d5dfdd2b7d4ddc0f4c7175a
+SHA1 (patch-include_crypto_rand.h) = c7c6556a483b56ba2ac23c6b44193ce3dc0b2119
diff -r 921b9308bb73 -r 7ac5346f4953 security/openssl/patches/patch-crypto_rand_rand__unix.c
--- a/security/openssl/patches/patch-crypto_rand_rand__unix.c   Tue Jan 11 13:02:56 2022 +0000
+++ b/security/openssl/patches/patch-crypto_rand_rand__unix.c   Tue Jan 11 13:54:01 2022 +0000
@@ -1,14 +1,26 @@
-$NetBSD: patch-crypto_rand_rand__unix.c,v 1.3 2021/08/25 15:22:05 adam Exp $
+$NetBSD: patch-crypto_rand_rand__unix.c,v 1.4 2022/01/11 13:54:01 schmonz Exp $
 
-Fix building on older Darwin.
+Apply upstream c023d98dcf2ba1cc30f545ae54d0e037e80a8794:
+Darwin platform allows to build on releases before Yosemite/ios 8.
 
---- crypto/rand/rand_unix.c.orig       2021-08-25 15:07:06.000000000 +0000
+--- crypto/rand/rand_unix.c.orig       2021-08-24 13:38:47.000000000 +0000
 +++ crypto/rand/rand_unix.c
-@@ -35,6 +35,7 @@
+@@ -34,9 +34,6 @@
+ #if defined(__OpenBSD__)
  # include <sys/param.h>
  #endif
- #if defined(__APPLE__)
-+# include <CommonCrypto/CommonCryptoError.h>
- # include <CommonCrypto/CommonRandom.h>
- #endif
+-#if defined(__APPLE__)
+-# include <CommonCrypto/CommonRandom.h>
+-#endif
  
+ #if defined(OPENSSL_SYS_UNIX) || defined(__DJGPP__)
+ # include <sys/types.h>
+@@ -381,7 +378,7 @@ static ssize_t syscall_random(void *buf,
+         if (errno != ENOSYS)
+             return -1;
+     }
+-#  elif defined(__APPLE__)
++#  elif defined(OPENSSL_APPLE_CRYPTO_RANDOM)
+     if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess)
+           return (ssize_t)buflen;
+ 
diff -r 921b9308bb73 -r 7ac5346f4953 security/openssl/patches/patch-include_crypto_rand.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openssl/patches/patch-include_crypto_rand.h      Tue Jan 11 13:54:01 2022 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-include_crypto_rand.h,v 1.1 2022/01/11 13:54:01 schmonz Exp $
+
+Apply upstream c023d98dcf2ba1cc30f545ae54d0e037e80a8794:
+Darwin platform allows to build on releases before Yosemite/ios 8.
+
+--- include/crypto/rand.h.orig 2021-08-24 13:38:47.000000000 +0000
++++ include/crypto/rand.h
+@@ -20,6 +20,16 @@
+ 
+ # include <openssl/rand.h>
+ 
++# if defined(__APPLE__) && !defined(OPENSSL_NO_APPLE_CRYPTO_RANDOM)
++#  include <Availability.h>
++#  if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000) || \
++     (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000)
++#   define OPENSSL_APPLE_CRYPTO_RANDOM 1
++#   include <CommonCrypto/CommonCryptoError.h>
++#   include <CommonCrypto/CommonRandom.h>
++#  endif
++# endif
++
+ /* forward declaration */
+ typedef struct rand_pool_st RAND_POOL;
+ 



Home | Main Index | Thread Index | Old Index