Commit 569318b2 authored by Alex Hornby's avatar Alex Hornby Committed by Facebook GitHub Bot

use system cert config when building own openssl

Summary: This fixes some missing cert errors when running eden_scm tests against our own build of openssl on macOS

Reviewed By: HarveyHunt

Differential Revision: D32617808

fbshipit-source-id: efc34341c2c9b578f9c1c92e0678dfb16ef9112e
parent d2715c95
......@@ -284,6 +284,15 @@ class BuildOptions(object):
):
# This must be the openssl library, let Rust know about it
env["OPENSSL_DIR"] = d
# And let openssl know to pick up the system certs if present
for system_ssl_cfg in ["/etc/pki/tls", "/etc/ssl"]:
if os.path.isdir(system_ssl_cfg):
cert_dir = system_ssl_cfg + "/certs"
if os.path.isdir(cert_dir):
env["SSL_CERT_DIR"] = cert_dir
cert_file = system_ssl_cfg + "/cert.pem"
if os.path.isfile(cert_file):
env["SSL_CERT_FILE"] = cert_file
return env
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment