mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
Make http.proxy-cainfo
fallback to http.cainfo
, like curl.
This commit is contained in:
parent
ca4a3b1f8b
commit
5af783129a
@ -61,7 +61,8 @@ pub fn configure_http_handle(gctx: &GlobalContext, handle: &mut Easy) -> CargoRe
|
|||||||
let cainfo = cainfo.resolve_path(gctx);
|
let cainfo = cainfo.resolve_path(gctx);
|
||||||
handle.cainfo(&cainfo)?;
|
handle.cainfo(&cainfo)?;
|
||||||
}
|
}
|
||||||
if let Some(proxy_cainfo) = &http.proxy_cainfo {
|
// Use `proxy_cainfo` if explicitly set; otherwise, fall back to `cainfo` as curl does #15376.
|
||||||
|
if let Some(proxy_cainfo) = http.proxy_cainfo.as_ref().or(http.cainfo.as_ref()) {
|
||||||
let proxy_cainfo = proxy_cainfo.resolve_path(gctx);
|
let proxy_cainfo = proxy_cainfo.resolve_path(gctx);
|
||||||
handle.proxy_cainfo(&format!("{}", proxy_cainfo.display()))?;
|
handle.proxy_cainfo(&format!("{}", proxy_cainfo.display()))?;
|
||||||
}
|
}
|
||||||
|
@ -711,7 +711,7 @@ certificates. If not specified, Cargo attempts to use the system certificates.
|
|||||||
|
|
||||||
#### `http.proxy-cainfo`
|
#### `http.proxy-cainfo`
|
||||||
* Type: string (path)
|
* Type: string (path)
|
||||||
* Default: none
|
* Default: falls back to `http.cainfo` if not set
|
||||||
* Environment: `CARGO_HTTP_PROXY_CAINFO`
|
* Environment: `CARGO_HTTP_PROXY_CAINFO`
|
||||||
|
|
||||||
Path to a Certificate Authority (CA) bundle file, used to verify proxy TLS
|
Path to a Certificate Authority (CA) bundle file, used to verify proxy TLS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user