Skip to content

Commit

Permalink
Include feature for (native) certificates
Browse files Browse the repository at this point in the history
Addresses #314 allowing use of fnm when behind a proxy with certificates by reapplying #468 after the revert from ureq to reqwest.

This adds the `"rustls-tls-native-roots"` [cargo feature](https://docs.rs/reqwest/0.11.3/reqwest/#optional-features) to reqwest. That uses [rustls-native-certs](https://github.com/rustls/rustls-native-certs):
> rustls-native-certs allows rustls to use the platform's native certificate store when operating as a TLS client.

I tested on macOS both with and without proxy mainly doing `cargo run -- list-remote`, and installing node 16, this worked behind proxy. Without proxy I only tested list-remote. Perhaps other commands need to be retested as well.

The [`native-tls`](https://docs.rs/native-tls/0.2.7/native_tls/) feature might also work, I didn't test. They seem to cover similar functionality but maybe it works better on Linux ARM systems.
  • Loading branch information
pfiaux authored and Schniz committed Dec 28, 2021
1 parent 207ef22 commit 9257b2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ log = "0.4.14"
env_logger = "0.9.0"
atty = "0.2.14"
encoding_rs_io = "0.1.7"
reqwest = { version = "0.11.7", features = ["blocking", "json", "rustls-tls", "brotli"], default-features = false }
reqwest = { version = "0.11.7", features = ["blocking", "json", "rustls-tls", "rustls-tls-native-roots", "brotli"], default-features = false }
url = "2.2.2"
sysinfo = "0.22.3"

Expand Down

0 comments on commit 9257b2d

Please sign in to comment.