Skip to content

Commit dc29129

Browse files
djcrami3l
authored andcommitted
Deprecate native-tls as well
1 parent 12841b8 commit dc29129

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ This new patch release has brought even more tiny fixes and improvements over th
66

77
The headlines of this release are:
88

9-
- The cURL download backend is now officially deprecated and a warning will start to show up when it is used. [pr#4277]
9+
- The cURL download backend and the native-tls TLS backend are now officially deprecated and a warning will start to show up when they are used. [pr#4277]
1010

1111
- While rustup predates reqwest and rustls, the rustup team has long wanted to standardize on
1212
an HTTP + TLS stack in Rust, which should increase security, potentially improve performance, and
1313
simplify maintenance of the project.
14-
With the default download backend already switched to reqwest since [2019](https://github.com/rust-lang/rustup/pull/1660),
15-
the team thinks it is time to start removing the cURL backend and focus on maintaining the Rust-based stack.
14+
With the default download backend already switched to reqwest since [2019](https://github.com/rust-lang/rustup/pull/1660)
15+
the team thinks it is time to focus maintenance on the Rust-based stack.
1616

1717
- The rustup team encourages everyone to switch to the reqwest backend, and would love to hear from
1818
you about your use case via GitHub Issues if it does work against your particular setup.

src/download/mod.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,19 @@ async fn download_file_(
127127
let use_curl_backend = process.var_os("RUSTUP_USE_CURL").map(|it| it != "0");
128128
if use_curl_backend == Some(true) {
129129
warn!(
130-
"RUSTUP_USE_CURL is set; the curl backend is deprecated, please file an issue if the \
131-
default download backend does not work for your use case"
130+
"RUSTUP_USE_CURL is set; the curl backend is deprecated,
131+
please file an issue if the default download backend does not work for your use case"
132132
);
133133
}
134134

135135
let use_rustls = process.var_os("RUSTUP_USE_RUSTLS").map(|it| it != "0");
136+
if use_rustls == Some(false) {
137+
warn!(
138+
"RUSTUP_USE_RUSTLS is set to `0`; the native-tls backend is deprecated,
139+
please file an issue if the default download backend does not work for your use case"
140+
);
141+
}
142+
136143
let backend = match (use_curl_backend, use_rustls) {
137144
// If environment specifies a backend that's unavailable, error out
138145
#[cfg(not(feature = "reqwest-rustls-tls"))]

0 commit comments

Comments
 (0)