Honor CARGO_HTTP_CAINFO in managed proxy environments (#34478)

## What changed

Add `CARGO_HTTP_CAINFO` to the curated custom CA environment variables so
Cargo inherits the managed MITM trust bundle. Preserve any startup Cargo CA
bundle in the generated trust bundle alongside the other supported overrides.

GitOrigin-RevId: 207847aa556d3a4f667ddb9e52d99e87ef984cae
This commit is contained in:
viyatb-oai authored and copyberry committed 2026-07-21 07:12:28 +00:00
1 parent 9e5625d9cf
commit c04452a240
1 file changed
+2 -1
+2 -1
View File
@@ -154,13 +154,14 @@ pub(crate) const SSL_CERT_DIR_ENV_KEY: &str = "SSL_CERT_DIR";
// Best-effort compatibility set for common child toolchains that accept a CA bundle path. // Best-effort compatibility set for common child toolchains that accept a CA bundle path.
// This is intentionally curated rather than pretending to cover every TLS client. // This is intentionally curated rather than pretending to cover every TLS client.
pub const CUSTOM_CA_ENV_KEYS: [&str; 10] = [ pub const CUSTOM_CA_ENV_KEYS: [&str; 11] = [
"CODEX_CA_CERTIFICATE", "CODEX_CA_CERTIFICATE",
"SSL_CERT_FILE", "SSL_CERT_FILE",
"REQUESTS_CA_BUNDLE", "REQUESTS_CA_BUNDLE",
"CURL_CA_BUNDLE", "CURL_CA_BUNDLE",
"NODE_EXTRA_CA_CERTS", "NODE_EXTRA_CA_CERTS",
"GIT_SSL_CAINFO", "GIT_SSL_CAINFO",
"CARGO_HTTP_CAINFO",
"PIP_CERT", "PIP_CERT",
"BUNDLE_SSL_CA_CERT", "BUNDLE_SSL_CA_CERT",
"npm_config_cafile", "npm_config_cafile",