diff options
author | schmonz <schmonz@pkgsrc.org> | 2022-01-11 13:54:01 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2022-01-11 13:54:01 +0000 |
commit | 40572c6793007185a1f8556d4446da02a5cec39d (patch) | |
tree | d583ecdd7534219ce1e0d7e3e4e0adc37a839c3e /security/openssl | |
parent | 709d7c34210ab47491113bd5b2fd58c3800c4691 (diff) | |
download | pkgsrc-40572c6793007185a1f8556d4446da02a5cec39d.tar.gz |
Apply upstream c023d98dcf2ba1cc30f545ae54d0e037e80a8794:
Darwin platform allows to build on releases before Yosemite/ios 8.
Fixes build on Snow Leopard. Still builds on Monterey.
Diffstat (limited to 'security/openssl')
-rw-r--r-- | security/openssl/distinfo | 5 | ||||
-rw-r--r-- | security/openssl/patches/patch-crypto_rand_rand__unix.c | 28 | ||||
-rw-r--r-- | security/openssl/patches/patch-include_crypto_rand.h | 24 |
3 files changed, 47 insertions, 10 deletions
diff --git a/security/openssl/distinfo b/security/openssl/distinfo index 3c050b70268..ac616e55d39 100644 --- a/security/openssl/distinfo +++ b/security/openssl/distinfo @@ -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 @@ Size (openssl-1.1.1l.tar.gz) = 9834044 bytes 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 --git a/security/openssl/patches/patch-crypto_rand_rand__unix.c b/security/openssl/patches/patch-crypto_rand_rand__unix.c index 70e18621107..3562be03849 100644 --- a/security/openssl/patches/patch-crypto_rand_rand__unix.c +++ b/security/openssl/patches/patch-crypto_rand_rand__unix.c @@ -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 --git a/security/openssl/patches/patch-include_crypto_rand.h b/security/openssl/patches/patch-include_crypto_rand.h new file mode 100644 index 00000000000..1a7a04ae92e --- /dev/null +++ b/security/openssl/patches/patch-include_crypto_rand.h @@ -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; + |