Skip to content

Commit 57a57d4

Browse files
committed
unix: set OPENSSLDIR to /private/etc/ssl on Apple platforms
This is the directory that system OpenSSL uses and what Apple's Python uses. By pointing our OpenSSL at the system directory, our OpenSSL should automatically pick up the system managed certificates by default, which seems like a useful property to have.
1 parent c57bf3d commit 57a57d4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cpython-unix/build-openssl.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ tar -xf openssl-${OPENSSL_VERSION}.tar.gz
1414
pushd openssl-${OPENSSL_VERSION}
1515

1616
# Otherwise it gets set to /tools/deps/ssl by default.
17-
EXTRA_FLAGS="--openssldir=/etc/ssl"
17+
case "${TARGET_TRIPLE}" in
18+
*apple*)
19+
EXTRA_FLAGS="--openssldir=/private/etc/ssl"
20+
;;
21+
*)
22+
EXTRA_FLAGS="--openssldir=/etc/ssl"
23+
;;
24+
esac
1825

1926
# musl is missing support for various primitives.
2027
# TODO disable secure memory is a bit scary. We should look into a proper

0 commit comments

Comments
 (0)