Skip to content
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

rustls-tls12 feature #844

Closed
wants to merge 1 commit into from
Closed
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
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ exclude = ["/cargo_deny.sh", "/deny.toml", "/test.sh"]
rust-version = "1.67"

[package.metadata.docs.rs]
features = ["rustls", "native-tls", "socks-proxy", "cookies", "gzip", "brotli", "charset", "json", "_test"]
features = ["rustls", "rustls-tls12", "native-tls", "socks-proxy", "cookies", "gzip", "brotli", "charset", "json", "_test"]

[features]
default = ["rustls", "gzip", "json"]
default = ["rustls", "rustls-tls12", "gzip", "json"]
rustls = ["dep:rustls", "_tls", "dep:rustls-platform-verifier", "dep:webpki-roots"]
rustls-tls12 = ["rustls/tls12"]
native-tls = ["dep:native-tls", "dep:der", "_tls", "dep:webpki-root-certs"]
socks-proxy = ["dep:socks"]
cookies = ["dep:cookie_store", "_url"]
Expand Down Expand Up @@ -52,7 +53,7 @@ webpki-roots = { version = "0.26.3", optional = true, default-features = false }
webpki-root-certs = { version = "0.26.4", optional = true, default-features = false }

# ring has a higher chance of compiling cleanly without additional developer environment
rustls = { version = "0.23.11", optional = true, default-features = false, features = ["ring", "logging", "std", "tls12"] }
rustls = { version = "0.23.11", optional = true, default-features = false, features = ["ring", "logging", "std"] }
native-tls = { version = "0.2.12", optional = true, default-features = false }
der = { version = "0.7.9", optional = true, default-features = false, features = ["pem", "std"] }

Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,12 @@ You can control them when including ureq as a dependency.

`ureq = { version = "3", features = ["socks-proxy", "charset"] }`

The default enabled features are: **rustls**, **gzip** and **json**.
The default enabled features are: **rustls**, **rustls-tls12**, **gzip** and **json**.

* **rustls** enabled the rustls TLS implementation. This is the default for the the crate level
* **rustls** enables the rustls TLS implementation. This is the default for the the crate level
convenience calls (`ureq::get` etc).
* **rustls-tls12** enables TLS1.2 compatibility for rustls (in addition to TLS1.3). This is
enabled by default to maximize compatibility.
* **native-tls** enables the native tls backend for TLS. Due to the risk of diamond dependencies
accidentally switching on an unwanted TLS implementation, `native-tls` is never picked up as
a default or used by the crate level convenience calls (`ureq::get` etc) – it must be configured
Expand Down Expand Up @@ -344,4 +346,3 @@ let agent: Agent = Config {
// This is proxied.
let resp = agent.get("http://cool.server").call()?;
```

6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,12 @@
//!
//! `ureq = { version = "3", features = ["socks-proxy", "charset"] }`
//!
//! The default enabled features are: **rustls**, **gzip** and **json**.
//! The default enabled features are: **rustls**, **rustls-tls12**, **gzip** and **json**.
//!
//! * **rustls** enabled the rustls TLS implementation. This is the default for the the crate level
//! * **rustls** enables the rustls TLS implementation. This is the default for the the crate level
//! convenience calls (`ureq::get` etc).
//! * **rustls-tls12** enables TLS1.2 compatibility for rustls (in addition to TLS1.3). This is
//! enabled by default to maximize compatibility.
//! * **native-tls** enables the native tls backend for TLS. Due to the risk of diamond dependencies
//! accidentally switching on an unwanted TLS implementation, `native-tls` is never picked up as
//! a default or used by the crate level convenience calls (`ureq::get` etc) – it must be configured
Expand Down
Loading