diff --git a/CHANGELOG.md b/CHANGELOG.md index bec814c8a1..3ca1133450 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Fixes + +- Respect `CURL_CA_BUNDLE` and `SSL_CERT_FILE` when configuring TLS certificate authorities ([#3301](https://github.com/getsentry/sentry-cli/pull/3301)). + ## 3.4.3 ### Security Fixes diff --git a/src/api/mod.rs b/src/api/mod.rs index ed01b96353..854ba779d5 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -244,6 +244,12 @@ impl Api { handle.ssl_verify_host(self.config.should_verify_ssl())?; handle.ssl_verify_peer(self.config.should_verify_ssl())?; + if let Ok(ca_bundle) = std::env::var("CURL_CA_BUNDLE") { + handle.cainfo(&ca_bundle)?; + } else if let Ok(ca_bundle) = std::env::var("SSL_CERT_FILE") { + handle.cainfo(&ca_bundle)?; + } + let env = self.config.get_pipeline_env(); let headers = self.config.get_headers();