uv
e9c16e9a - Enable TLS native root toggling at runtime (#2362)

Commit
1 year ago
Enable TLS native root toggling at runtime (#2362) ## Summary It turns out that on macOS, reading the native certificates can add hundreds of milliseconds to client initialization. This PR makes `--native-tls` a command-line flag, to toggle (at runtime) the choice of the `webpki` roots or the native system roots. You can't accomplish this kind of configuration with the `reqwest` builder API, so instead, I pulled out the heart of that logic from the crate (https://github.com/seanmonstar/reqwest/blob/e3192638518d577759dd89da489175b8f992b12f/src/async_impl/client.rs#L498), and modified it to allow toggling a choice of root. Note that there's an open PR for this in reqwest (https://github.com/seanmonstar/reqwest/pull/1848), along with an issue (https://github.com/seanmonstar/reqwest/issues/1843), which I may ping, but it's been around for a while and I believe reqwest is focused on its next major release. Closes https://github.com/astral-sh/uv/issues/2346.
Author
Parents
Loading