Revert "Upgrade to rustls v0.23.22" (#24197)

Reverts zed-industries/zed#24138

Nightly build failed, I believe because of this.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189


![image](https://github.com/user-attachments/assets/8121dfb7-4ae7-4efb-8625-f07967640620)

CC: @ConradIrwin 

Release Notes:

- N/A
This commit is contained in:
Peter Tripp 2025-02-04 10:20:07 -05:00 committed by GitHub
parent a0269aba77
commit c50cb90d6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 47 additions and 95 deletions

128
Cargo.lock generated
View file

@ -1001,13 +1001,14 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
[[package]]
name = "async-tls"
version = "0.13.0"
source = "git+https://github.com/zed-industries/async-tls?rev=1e759a4b5e370f87dc15e40756ac4f8815b61d9d#1e759a4b5e370f87dc15e40756ac4f8815b61d9d"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2ae3c9eba89d472a0e4fe1dea433df78fbbe63d2b764addaf2ba3a6bde89a5e"
dependencies = [
"futures-core",
"futures-io",
"rustls 0.23.22",
"rustls-pemfile 2.2.0",
"webpki-roots",
"rustls 0.21.12",
"rustls-pemfile 1.0.4",
"webpki-roots 0.22.6",
]
[[package]]
@ -1221,31 +1222,6 @@ dependencies = [
"zeroize",
]
[[package]]
name = "aws-lc-rs"
version = "1.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c2b7ddaa2c56a367ad27a094ad8ef4faacf8a617c2575acb2ba88949df999ca"
dependencies = [
"aws-lc-sys",
"paste",
"zeroize",
]
[[package]]
name = "aws-lc-sys"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71b2ddd3ada61a305e1d8bb6c005d1eaa7d14d903681edfc400406d523a9b491"
dependencies = [
"bindgen 0.69.5",
"cc",
"cmake",
"dunce",
"fs_extra",
"paste",
]
[[package]]
name = "aws-runtime"
version = "1.5.4"
@ -1753,29 +1729,6 @@ dependencies = [
"serde",
]
[[package]]
name = "bindgen"
version = "0.69.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
dependencies = [
"bitflags 2.8.0",
"cexpr",
"clang-sys",
"itertools 0.12.1",
"lazy_static",
"lazycell",
"log",
"prettyplease",
"proc-macro2",
"quote",
"regex",
"rustc-hash 1.1.0",
"shlex",
"syn 2.0.90",
"which 4.4.2",
]
[[package]]
name = "bindgen"
version = "0.70.1"
@ -2607,7 +2560,7 @@ dependencies = [
"rand 0.8.5",
"release_channel",
"rpc",
"rustls 0.23.22",
"rustls 0.21.12",
"rustls-native-certs 0.8.1",
"schemars",
"serde",
@ -2637,15 +2590,6 @@ dependencies = [
"smallvec",
]
[[package]]
name = "cmake"
version = "0.1.53"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e24a03c8b52922d68a1589ad61032f2c1aa5a8158d2aa0d93c6e9534944bbad6"
dependencies = [
"cc",
]
[[package]]
name = "cobs"
version = "0.2.3"
@ -3218,7 +3162,7 @@ version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ce857aa0b77d77287acc1ac3e37a05a8c95a2af3647d23b15f263bdaeb7562b"
dependencies = [
"bindgen 0.70.1",
"bindgen",
]
[[package]]
@ -4935,12 +4879,6 @@ dependencies = [
"winapi",
]
[[package]]
name = "fs_extra"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
[[package]]
name = "fsevent"
version = "0.1.0"
@ -5449,7 +5387,7 @@ dependencies = [
"ashpd",
"async-task",
"backtrace",
"bindgen 0.70.1",
"bindgen",
"blade-graphics",
"blade-macros",
"blade-util",
@ -6074,7 +6012,7 @@ dependencies = [
"http 1.2.0",
"hyper 1.5.1",
"hyper-util",
"rustls 0.23.22",
"rustls 0.23.20",
"rustls-native-certs 0.8.1",
"rustls-pki-types",
"tokio",
@ -7094,12 +7032,6 @@ dependencies = [
"spin",
]
[[package]]
name = "lazycell"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "leb128"
version = "0.2.5"
@ -7156,7 +7088,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
dependencies = [
"cfg-if",
"windows-targets 0.48.5",
"windows-targets 0.52.6",
]
[[package]]
@ -7744,7 +7676,7 @@ name = "media"
version = "0.1.0"
dependencies = [
"anyhow",
"bindgen 0.70.1",
"bindgen",
"core-foundation 0.9.4",
"ctor",
"foreign-types 0.5.0",
@ -10380,7 +10312,7 @@ dependencies = [
"quinn-proto",
"quinn-udp",
"rustc-hash 2.1.0",
"rustls 0.23.22",
"rustls 0.23.20",
"socket2",
"thiserror 2.0.6",
"tokio",
@ -10398,7 +10330,7 @@ dependencies = [
"rand 0.8.5",
"ring",
"rustc-hash 2.1.0",
"rustls 0.23.22",
"rustls 0.23.20",
"rustls-pki-types",
"slab",
"thiserror 2.0.6",
@ -10959,7 +10891,7 @@ dependencies = [
"percent-encoding",
"pin-project-lite",
"quinn",
"rustls 0.23.22",
"rustls 0.23.20",
"rustls-native-certs 0.8.1",
"rustls-pemfile 2.2.0",
"rustls-pki-types",
@ -11333,12 +11265,10 @@ dependencies = [
[[package]]
name = "rustls"
version = "0.23.22"
version = "0.23.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fb9263ab4eb695e42321db096e3b8fbd715a59b154d5c88d82db2175b681ba7"
checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b"
dependencies = [
"aws-lc-rs",
"log",
"once_cell",
"ring",
"rustls-pki-types",
@ -11414,7 +11344,6 @@ version = "0.102.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9"
dependencies = [
"aws-lc-rs",
"ring",
"rustls-pki-types",
"untrusted",
@ -12413,7 +12342,7 @@ dependencies = [
"once_cell",
"percent-encoding",
"rust_decimal",
"rustls 0.23.22",
"rustls 0.23.20",
"rustls-pemfile 2.2.0",
"serde",
"serde_json",
@ -12426,7 +12355,7 @@ dependencies = [
"tracing",
"url",
"uuid",
"webpki-roots",
"webpki-roots 0.26.7",
]
[[package]]
@ -13658,7 +13587,7 @@ version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37"
dependencies = [
"rustls 0.23.22",
"rustls 0.23.20",
"tokio",
]
@ -15288,6 +15217,25 @@ dependencies = [
"wasm-bindgen",
]
[[package]]
name = "webpki"
version = "0.22.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53"
dependencies = [
"ring",
"untrusted",
]
[[package]]
name = "webpki-roots"
version = "0.22.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87"
dependencies = [
"webpki",
]
[[package]]
name = "webpki-roots"
version = "0.26.7"

View file

@ -465,7 +465,7 @@ runtimelib = { version = "0.25.0", default-features = false, features = [
rustc-demangle = "0.1.23"
rust-embed = { version = "8.4", features = ["include-exclude"] }
rustc-hash = "2.1.0"
rustls = { version = "0.23.22", features = ["ring"] }
rustls = "0.21.12"
rustls-native-certs = "0.8.0"
schemars = { version = "0.8", features = ["impl_json_schema", "indexmap2"] }
semver = "1.0"
@ -606,7 +606,6 @@ features = [
# TODO livekit https://github.com/RustAudio/cpal/pull/891
[patch.crates-io]
cpal = { git = "https://github.com/zed-industries/cpal", rev = "fd8bc2fd39f1f5fdee5a0690656caff9a26d9d50" }
real-async-tls = { git = "https://github.com/zed-industries/async-tls", rev = "1e759a4b5e370f87dc15e40756ac4f8815b61d9d", package = "async-tls"}
[profile.dev]
split-debuginfo = "unpacked"

View file

@ -146,8 +146,6 @@ pub fn init_settings(cx: &mut App) {
}
pub fn init(client: &Arc<Client>, cx: &mut App) {
let _ = rustls::crypto::ring::default_provider().install_default();
let client = Arc::downgrade(client);
cx.on_action({
let client = client.clone();
@ -1133,8 +1131,15 @@ impl Client {
for error in root_certs.errors {
log::warn!("error loading native certs: {:?}", error);
}
root_store.add_parsable_certificates(root_certs.certs);
root_store.add_parsable_certificates(
&root_certs
.certs
.into_iter()
.map(|cert| cert.as_ref().to_owned())
.collect::<Vec<_>>(),
);
rustls::ClientConfig::builder()
.with_safe_defaults()
.with_root_certificates(root_store)
.with_no_client_auth()
};