fix(updater): stop overriding SSL_CERT_FILE and SSL_CERT_DIR on Linux (#3615)

check() set both variables to Debian paths when they were unset. On distros
with a different layout, such as ALT Linux, the paths do not exist, and
rustls-native-certs then loads roots only from them, so every TLS client
created afterwards in the app got an empty root store.

reqwest with rustls already finds the system store through
rustls-platform-verifier and openssl-probe, so the override is not needed.

Closes #3598
This commit is contained in:
Timofey Maykov
2026-09-23 09:29:37 -03:00
committed by GitHub
parent 55f9645aa2
commit 101e1b068a
2 changed files with 6 additions and 10 deletions
-10
View File
@@ -539,16 +539,6 @@ impl Updater {
headers.insert(ACCEPT, HeaderValue::from_static("application/json"));
}
// Set SSL certs for linux if they aren't available.
#[cfg(target_os = "linux")]
{
if std::env::var_os("SSL_CERT_FILE").is_none() {
std::env::set_var("SSL_CERT_FILE", "/etc/ssl/certs/ca-certificates.crt");
}
if std::env::var_os("SSL_CERT_DIR").is_none() {
std::env::set_var("SSL_CERT_DIR", "/etc/ssl/certs");
}
}
let target = if let Some(target) = &self.target {
target
} else {