diff --git a/Cargo.lock b/Cargo.lock index 4898b2b5..1bd8e47d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1836,6 +1836,7 @@ dependencies = [ "log", "nix", "notify-rust", + "openssl-probe", "pretty_env_logger", "rust-ini", "self_update", diff --git a/Cargo.toml b/Cargo.toml index 15588a27..2facf534 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,6 +45,7 @@ self_update_crate = { version = "0.16.0", optional = true, package = "self_upda [target.'cfg(target_os = "linux")'.dependencies] rust-ini = "0.15.0" +openssl-probe = { version = "0.1.2", optional = true } [profile.release] lto = true @@ -52,4 +53,4 @@ lto = true [features] default = [] -self-update = ["self_update_crate"] +self-update = ["self_update_crate", "openssl-probe"] diff --git a/src/main.rs b/src/main.rs index f8f65a38..510d698c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -23,6 +23,7 @@ use self::steps::*; use self::terminal::*; use anyhow::{anyhow, Result}; use log::debug; + use std::env; use std::io; use std::process::exit; @@ -74,6 +75,9 @@ fn run() -> Result<()> { #[cfg(feature = "self-update")] { + #[cfg(target_os = "linux")] + openssl_probe::init_ssl_cert_env_vars(); + if !run_type.dry() && env::var("TOPGRADE_NO_SELF_UPGRADE").is_err() { let result = self_update::self_update();