pkgsrc-Changes archive

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

CVS commit: pkgsrc/security/openssl



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Tue Jan 11 13:54:01 UTC 2022

Modified Files:
        pkgsrc/security/openssl: distinfo
        pkgsrc/security/openssl/patches: patch-crypto_rand_rand__unix.c
Added Files:
        pkgsrc/security/openssl/patches: patch-include_crypto_rand.h

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


To generate a diff of this commit:
cvs rdiff -u -r1.155 -r1.156 pkgsrc/security/openssl/distinfo
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/security/openssl/patches/patch-crypto_rand_rand__unix.c
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/security/openssl/patches/patch-include_crypto_rand.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/security/openssl/distinfo
diff -u pkgsrc/security/openssl/distinfo:1.155 pkgsrc/security/openssl/distinfo:1.156
--- pkgsrc/security/openssl/distinfo:1.155      Tue Jan 11 11:10:39 2022
+++ pkgsrc/security/openssl/distinfo    Tue Jan 11 13:54:01 2022
@@ -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 b
 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

Index: pkgsrc/security/openssl/patches/patch-crypto_rand_rand__unix.c
diff -u pkgsrc/security/openssl/patches/patch-crypto_rand_rand__unix.c:1.3 pkgsrc/security/openssl/patches/patch-crypto_rand_rand__unix.c:1.4
--- pkgsrc/security/openssl/patches/patch-crypto_rand_rand__unix.c:1.3  Wed Aug 25 15:22:05 2021
+++ pkgsrc/security/openssl/patches/patch-crypto_rand_rand__unix.c      Tue Jan 11 13:54:01 2022
@@ -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;
  

Added files:

Index: pkgsrc/security/openssl/patches/patch-include_crypto_rand.h
diff -u /dev/null pkgsrc/security/openssl/patches/patch-include_crypto_rand.h:1.1
--- /dev/null   Tue Jan 11 13:54:01 2022
+++ pkgsrc/security/openssl/patches/patch-include_crypto_rand.h Tue Jan 11 13:54:01 2022
@@ -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