From ea540ea89a961d7c626cdf51b9a1054c11215b0d Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Mon, 24 Feb 2025 09:49:28 +0100 Subject: [PATCH] Do not call openssl_probe::init_ssl_cert_env_vars() on FreeBSD (#1129) The heuristics in openssl-probe leave the process environment with an invalid value breaking the certificate validation on FreeBSD. FreeBSD has a system truststore managed by certctl(8). Leave it to OpenSSL to do the right thing. Upstream issue: https://github.com/alexcrichton/openssl-probe/issues/37 This fixes #1129 --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index fd2db63432..bbc5dc3f62 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -759,6 +759,7 @@ fn init() { unix, not(target_os = "macos"), not(target_os = "ios"), + not(target_os = "freebsd"), feature = "https" ))] fn openssl_env_init() { @@ -880,6 +881,7 @@ fn openssl_env_init() { windows, target_os = "macos", target_os = "ios", + target_os = "freebsd", not(feature = "https") ))] fn openssl_env_init() {}