From 893972698cc64ebb6695c801c73daee780551662 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Wed, 4 Mar 2026 09:14:03 +0000 Subject: [PATCH] dist/http: Enable Reqwest Rustls backend Working around a Reqwest bug where the openssl backend ignores root certificates. See also: https://github.com/seanmonstar/reqwest/issues/1260 Fixes #2396 --- src/dist/http.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dist/http.rs b/src/dist/http.rs index 09aa862ed..35db4b7e7 100644 --- a/src/dist/http.rs +++ b/src/dist/http.rs @@ -742,6 +742,9 @@ mod server { server_id.addr() ); let mut client_builder = reqwest::blocking::ClientBuilder::new(); + // Workaround reqwest ignoring root certificate when openssl backend is used. + // https://github.com/seanmonstar/reqwest/issues/1260 + client_builder = client_builder.use_rustls_tls(); // Add all the certificates we know about client_builder = client_builder.add_root_certificate( reqwest::Certificate::from_pem(&cert_pem) @@ -1148,6 +1151,9 @@ mod client { cert_pem: Vec, ) -> Result<()> { let mut client_async_builder = reqwest::ClientBuilder::new(); + // Workaround reqwest ignoring root certificate when openssl backend is used. + // https://github.com/seanmonstar/reqwest/issues/1260 + client_async_builder = client_async_builder.use_rustls_tls(); // Add all the certificates we know about client_async_builder = client_async_builder.add_root_certificate( reqwest::Certificate::from_pem(&cert_pem)