File: 0002-cargo-remove-rustls.patch

package info (click to toggle)
rustup 1.27.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,636 kB
  • sloc: sh: 856; python: 233; javascript: 183; makefile: 27
file content (78 lines) | stat: -rw-r--r-- 2,411 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
From: liushuyu <liushuyu011@gmail.com>
Date: Mon, 11 Sep 2023 18:08:48 -0600
Subject: [PATCH 2/7] cargo: remove rustls
Forwarded: not-needed

---
 Cargo.lock          | 385 +++++++++++++++++++++-------------------------------
 Cargo.toml          |   6 +-
 download/Cargo.toml |   5 +-
 src/utils/utils.rs  |   2 +-
 tests/suite/mod.rs  |   1 +
 5 files changed, 160 insertions(+), 239 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index f764cf7..8c64779 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,16 +15,12 @@ curl-backend = ["download/curl-backend"]
 default = [
     "curl-backend",
     "reqwest-backend",
-    "reqwest-default-tls",
-    "reqwest-rustls-tls",
+    "reqwest-default-tls"
 ]
 
 reqwest-backend = ["download/reqwest-backend"]
-vendored-openssl = ['openssl/vendored']
 
 reqwest-default-tls = ["download/reqwest-default-tls"]
-reqwest-rustls-tls = ["download/reqwest-rustls-tls"]
-
 # Include in the default set to disable self-update and uninstall.
 no-self-update = []
 
diff --git a/download/Cargo.toml b/download/Cargo.toml
index 3f3fb24..d4e91dd 100644
--- a/download/Cargo.toml
+++ b/download/Cargo.toml
@@ -6,12 +6,11 @@ license = "MIT OR Apache-2.0"
 
 [features]
 
-default = ["reqwest-backend", "reqwest-rustls-tls", "reqwest-default-tls"]
+default = ["reqwest-backend", "reqwest-default-tls"]
 
 curl-backend = ["curl"]
 reqwest-backend = ["reqwest", "env_proxy"]
 reqwest-default-tls = ["reqwest/default-tls", "dep:once_cell"]
-reqwest-rustls-tls = ["reqwest/rustls-tls-native-roots", "dep:once_cell"]
 
 [dependencies]
 anyhow.workspace = true
diff --git a/src/utils/utils.rs b/src/utils/utils.rs
index e2ad7c0..00a1863 100644
--- a/src/utils/utils.rs
+++ b/src/utils/utils.rs
@@ -222,7 +222,7 @@ fn download_file_(
 
     // Keep the curl env var around for a bit
     let use_curl_backend = process().var_os("RUSTUP_USE_CURL").is_some();
-    let use_rustls = process().var_os("RUSTUP_USE_RUSTLS").is_some();
+    let use_rustls = false;
     let (backend, notification) = if use_curl_backend {
         (Backend::Curl, Notification::UsingCurl)
     } else {
diff --git a/tests/suite/mod.rs b/tests/suite/mod.rs
index ddd7f59..4274a88 100644
--- a/tests/suite/mod.rs
+++ b/tests/suite/mod.rs
@@ -3,6 +3,7 @@ mod cli_inst_interactive;
 mod cli_misc;
 mod cli_paths;
 mod cli_rustup;
+#[cfg(not(feature = "no-self-update"))]
 mod cli_self_upd;
 mod cli_ui;
 mod cli_v1;