diff --git a/Cargo.lock b/Cargo.lock index 09316466..78885d27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1832,6 +1832,7 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "nix 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rust-ini 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "self_update 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.92 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 0df45200..c308a571 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,6 +30,7 @@ chrono = "0.4.6" tokio = "0.1.21" tokio-process = "0.2.3" futures = "0.1.27" +openssl-probe = { version = "0.1.2", optional = true } [target.'cfg(unix)'.dependencies] nix = "0.14.0" @@ -40,4 +41,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 62cd0b66..18b086a8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,6 +16,8 @@ use self::steps::*; use self::terminal::*; use failure::{Fail, ResultExt}; use log::debug; +#[cfg(feature = "self-update")] +use openssl_probe; use std::borrow::Cow; use std::env; use std::fmt::Debug; @@ -84,6 +86,7 @@ fn run() -> Result<(), Error> { #[cfg(feature = "self-update")] { + openssl_probe::init_ssl_cert_env_vars(); if !run_type.dry() && env::var("TOPGRADE_NO_SELF_UPGRADE").is_err() { if let Err(e) = self_update::self_update() { print_warning(format!("Self update error: {}", e));