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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
|
From 793047f63f0f603e342c919bbfc469c7569276fa Mon Sep 17 00:00:00 2001
From: Matthew Esposito <matt@matthew.science>
Date: Wed, 18 Sep 2024 11:24:00 -0400
Subject: [PATCH] fix(client): revert to hyper-rustls=0.24.2
---
Cargo.lock | 71 ++++++++++++++++++++++-----------------------------
Cargo.toml | 2 +-
src/client.rs | 7 +----
3 files changed, 33 insertions(+), 47 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 18750b89..a7dfbc00 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -161,6 +161,12 @@ dependencies = [
"rustc-demangle",
]
+[[package]]
+name = "base64"
+version = "0.21.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
+
[[package]]
name = "base64"
version = "0.22.1"
@@ -822,9 +828,9 @@ dependencies = [
[[package]]
name = "hyper-rustls"
-version = "0.25.0"
+version = "0.24.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "399c78f9338483cb7e630c8474b07268983c6bd5acee012e4211f9f7bb21b070"
+checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590"
dependencies = [
"futures-util",
"http",
@@ -832,7 +838,6 @@ dependencies = [
"log",
"rustls",
"rustls-native-certs",
- "rustls-pki-types",
"tokio",
"tokio-rustls",
]
@@ -1214,7 +1219,7 @@ version = "0.35.1"
dependencies = [
"arc-swap",
"askama",
- "base64",
+ "base64 0.22.1",
"brotli",
"build_html",
"cached",
@@ -1379,55 +1384,44 @@ dependencies = [
[[package]]
name = "rustls"
-version = "0.22.4"
+version = "0.21.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432"
+checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e"
dependencies = [
"log",
"ring",
- "rustls-pki-types",
"rustls-webpki",
- "subtle",
- "zeroize",
+ "sct",
]
[[package]]
name = "rustls-native-certs"
-version = "0.7.0"
+version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792"
+checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00"
dependencies = [
"openssl-probe",
"rustls-pemfile",
- "rustls-pki-types",
"schannel",
"security-framework",
]
[[package]]
name = "rustls-pemfile"
-version = "2.1.2"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d"
+checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c"
dependencies = [
- "base64",
- "rustls-pki-types",
+ "base64 0.21.7",
]
-[[package]]
-name = "rustls-pki-types"
-version = "1.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d"
-
[[package]]
name = "rustls-webpki"
-version = "0.102.4"
+version = "0.101.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e"
+checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765"
dependencies = [
"ring",
- "rustls-pki-types",
"untrusted",
]
@@ -1473,6 +1467,16 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+[[package]]
+name = "sct"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
[[package]]
name = "sealed_test"
version = "1.1.0"
@@ -1634,12 +1638,6 @@ version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
-[[package]]
-name = "subtle"
-version = "2.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
-
[[package]]
name = "syn"
version = "1.0.109"
@@ -1783,12 +1781,11 @@ dependencies = [
[[package]]
name = "tokio-rustls"
-version = "0.25.0"
+version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f"
+checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
dependencies = [
"rustls",
- "rustls-pki-types",
"tokio",
]
@@ -2154,9 +2151,3 @@ dependencies = [
"quote",
"syn 2.0.68",
]
-
-[[package]]
-name = "zeroize"
-version = "1.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
diff --git a/Cargo.toml b/Cargo.toml
index 5cf4881e..451a83a9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,7 +22,7 @@ serde = { version = "1.0.193", features = ["derive"] }
cookie = "0.18.0"
futures-lite = "2.2.0"
hyper = { version = "0.14.28", features = ["full"] }
-hyper-rustls = "0.25.0"
+hyper-rustls = "0.24.2"
percent-encoding = "2.3.1"
route-recognizer = "0.3.1"
serde_json = "1.0.108"
diff --git a/src/client.rs b/src/client.rs
index 33ea6fe4..d4701ba5 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -26,12 +26,7 @@ const REDDIT_URL_BASE: &str = "https://oauth.reddit.com";
const ALTERNATIVE_REDDIT_URL_BASE: &str = "https://www.reddit.com";
pub static CLIENT: Lazy<Client<HttpsConnector<HttpConnector>>> = Lazy::new(|| {
- let https = hyper_rustls::HttpsConnectorBuilder::new()
- .with_native_roots()
- .expect("No native root certificates found")
- .https_only()
- .enable_http1()
- .build();
+ let https = hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_only().enable_http1().build();
client::Client::builder().build(https)
});
|