Description: Use reqwest 0.13 (available in Debian) instead of 0.12 Debian sid ships reqwest 0.13. Two changes are needed beyond the version bump: * The `rustls-tls-native-roots` feature from 0.12 was replaced in 0.13 by `rustls` (which uses rustls-platform-verifier under the hood). We switch to `native-tls` here instead: it uses the system OpenSSL trust store, which avoids the slow rustls-platform-verifier initialisation on first request and keeps the same "trust the OS roots" semantics. * `ClientBuilder::tls_built_in_native_certs(false)` no longer exists. The equivalent for explicit-CA mode is to add the certs and tell the builder not to also load the platform store — `tls_certs_only(certs)` does both in one call. Author: Jelmer Vernooij Forwarded: not-needed Last-Update: 2026-05-15 Index: dromedary/Cargo.toml =================================================================== --- dromedary.orig/Cargo.toml +++ dromedary/Cargo.toml @@ -48,9 +48,9 @@ base64 = "0.22" # reqwest replaces ureq: ureq-proto (transitive) hardcodes a method # whitelist that rejects WebDAV verbs (MKCOL, MOVE, COPY, PROPFIND). # reqwest is hyper-based and accepts arbitrary methods. `blocking` -# keeps our sync API shape; `rustls-tls-native-roots` wires rustls -# with the platform's native trust store. -reqwest = { version = "0.12", default-features = false, features = ["rustls-tls-native-roots", "gzip", "blocking"] } +# keeps our sync API shape; `native-tls` uses the system OpenSSL +# stack and its trust store. +reqwest = { version = "0.13", default-features = false, features = ["native-tls", "gzip", "blocking"] } # Lightweight dep used only for typed error classification — we # downcast reqwest's error chain to `hyper::Error` so we can # distinguish protocol-level parse failures (bad HTTP version, bad Index: dromedary/src/http/client.rs =================================================================== --- dromedary.orig/src/http/client.rs +++ dromedary/src/http/client.rs @@ -1564,15 +1564,12 @@ fn build_client(config: &HttpClientConfi .danger_accept_invalid_certs(true) .danger_accept_invalid_hostnames(true); } else if let Some(path) = &config.ca_certs_path { - for cert in root_certs_from_pem_file(path)? { - builder = builder.add_root_certificate(cert); - } - // Don't also trust the platform native store when the caller - // passed an explicit bundle — `reqwest` defaults that on with - // `rustls-tls-native-roots`, but the Python test suite sets - // a fake CA and expects only that bundle to match (tests - // against https with a self-signed cert fail otherwise). - builder = builder.tls_built_in_native_certs(false); + // The Python test suite sets a fake CA and expects only that + // bundle to match — `tls_certs_only` adds the supplied certs + // and excludes the platform trust store in one call (replacing + // the 0.12-era `add_root_certificate` + `tls_built_in_native_certs(false)` + // pair). + builder = builder.tls_certs_only(root_certs_from_pem_file(path)?); } // If no CA bundle was supplied and verification wasn't // disabled, fall through and let reqwest's