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

try to reland rustls without breaking linux arm builders

See: 
- #24197
- #24138

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2025-02-05 14:24:21 -07:00 committed by GitHub
parent e506efa9bf
commit 9114ca973c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 98 additions and 47 deletions

View file

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