Skip to content

Commit 94b2639

Browse files
authored
bpo 45007: Update macOS installer builds to use OpenSSL 1.1.1l. (GH-28051)
1 parent 71853a7 commit 94b2639

File tree

3 files changed

+64
-3
lines changed

3 files changed

+64
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
From cef404f1e7a598166cbc2fd2e0048f7e2d752ad5 Mon Sep 17 00:00:00 2001
2+
From: David Carlier <devnexen@gmail.com>
3+
Date: Tue, 24 Aug 2021 22:40:14 +0100
4+
Subject: [PATCH] Darwin platform allows to build on releases before
5+
Yosemite/ios 8.
6+
7+
issue #16407 #16408
8+
---
9+
crypto/rand/rand_unix.c | 5 +----
10+
include/crypto/rand.h | 10 ++++++++++
11+
2 files changed, 11 insertions(+), 4 deletions(-)
12+
13+
diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c
14+
index 43f1069d15..0f4525106a 100644
15+
--- a/crypto/rand/rand_unix.c
16+
+++ b/crypto/rand/rand_unix.c
17+
@@ -34,9 +34,6 @@
18+
#if defined(__OpenBSD__)
19+
# include <sys/param.h>
20+
#endif
21+
-#if defined(__APPLE__)
22+
-# include <CommonCrypto/CommonRandom.h>
23+
-#endif
24+
25+
#if defined(OPENSSL_SYS_UNIX) || defined(__DJGPP__)
26+
# include <sys/types.h>
27+
@@ -381,7 +378,7 @@ static ssize_t syscall_random(void *buf, size_t buflen)
28+
if (errno != ENOSYS)
29+
return -1;
30+
}
31+
-# elif defined(__APPLE__)
32+
+# elif defined(OPENSSL_APPLE_CRYPTO_RANDOM)
33+
if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess)
34+
return (ssize_t)buflen;
35+
36+
diff --git a/include/crypto/rand.h b/include/crypto/rand.h
37+
index 5350d3a931..674f840fd1 100644
38+
--- a/include/crypto/rand.h
39+
+++ b/include/crypto/rand.h
40+
@@ -20,6 +20,16 @@
41+
42+
# include <openssl/rand.h>
43+
44+
+# if defined(__APPLE__) && !defined(OPENSSL_NO_APPLE_CRYPTO_RANDOM)
45+
+# include <Availability.h>
46+
+# if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000) || \
47+
+ (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000)
48+
+# define OPENSSL_APPLE_CRYPTO_RANDOM 1
49+
+# include <CommonCrypto/CommonCryptoError.h>
50+
+# include <CommonCrypto/CommonRandom.h>
51+
+# endif
52+
+# endif
53+
+
54+
/* forward declaration */
55+
typedef struct rand_pool_st RAND_POOL;
56+
57+
--
58+
2.33.0
59+

Mac/BuildScript/build-installer.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,10 @@ def library_recipes():
246246

247247
result.extend([
248248
dict(
249-
name="OpenSSL 1.1.1k",
250-
url="https://www.openssl.org/source/openssl-1.1.1k.tar.gz",
251-
checksum='c4e7d95f782b08116afa27b30393dd27',
249+
name="OpenSSL 1.1.1l",
250+
url="https://www.openssl.org/source/openssl-1.1.1l.tar.gz",
251+
checksum='ac0d4387f3ba0ad741b0580dd45f6ff3',
252+
patches=['0001-Darwin-platform-allows-to-build-on-releases-before-Y.patch'],
252253
buildrecipe=build_universal_openssl,
253254
configure=None,
254255
install=None,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update macOS installer builds to use OpenSSL 1.1.1l.

0 commit comments

Comments
 (0)