Skip to content

cargo: expose reqwest TLS feature flags #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@ strum_macros = "0.13"
tar = "0.4"
tokio = "0.1"
dirs = "1.0"
reqwest = "0.9"
reqwest = { version = "^0.9.6", default-features = false }

[dev-dependencies]
env_logger = "0.6"
spectral = "0.6"

[features]
default = ["reqwest-default-tls"]
reqwest-default-tls = ["reqwest/default-tls"]
reqwest-rustls = ["reqwest/rustls-tls"]
test-net = []
test-mock = ["mockito"]

Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ conformant to the [Docker Registry HTTP API V2][registry-v2] specification.

[registry-v2]: https://docs.docker.com/registry/spec/api/

## Configurable features

The following is a list of [Cargo features][cargo-features] that consumers can enable or disable:

* **reqwest-default-tls** *(enabled by default)*: provides TLS support via [system-specific library][native-tls] (OpenSSL on Linux)
* **reqwest-rustls**: provides TLS support via the [rustls][rustls] library

[rustls]: https://docs.rs/rustls
[native-tls]: https://docs.rs/native-tls
[cargo-features]: https://doc.rust-lang.org/stable/cargo/reference/manifest.html#the-features-section

## Testing

### Integration tests
Expand All @@ -29,7 +40,7 @@ cargo test --features test-mock

This library includes additional interoperability tests against some of the most common registries.

Those tests are not run by default as they required network access and registry credentials.
Those tests are not run by default as they require network access and registry credentials.

They are gated behind a dedicated "test-net" feature and can be run as:
```
Expand Down