diff --git a/src/app.rs b/src/app.rs index b745d831e07c32..739aeec386de63 100644 --- a/src/app.rs +++ b/src/app.rs @@ -421,7 +421,12 @@ impl FinishedApplication { } pub fn init_global() { - openssl_probe::init_ssl_cert_env_vars(); + // Configure the default openssl trust store if not provided in the environment. + if std::env::var(openssl_probe::ENV_CERT_FILE).is_err() + && std::env::var(openssl_probe::ENV_CERT_DIR).is_err() + { + openssl_probe::init_ssl_cert_env_vars(); + } #[cfg(not(feature = "enterprise-tests"))] metrics::init_global().expect("metrics initialization failed");