Skip to content

Commit

Permalink
Pull in new rustls-platform-verifier
Browse files Browse the repository at this point in the history
  • Loading branch information
howardjohn committed Mar 25, 2024
1 parent f572300 commit cdf1343
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@ jobs:
env:
RUST_BACKTRACE: 1

- name: cargo test (debug; native-tokio only)
run: cargo test --no-default-features --features native-tokio
- name: cargo test (debug; native-tokio)
run: cargo test --no-default-features --features native-tokio,aws-lc-rs
env:
RUST_BACKTRACE: 1

- name: cargo test (debug; webpki-tokio only)
run: cargo test --no-default-features --features webpki-tokio
- name: cargo test (debug; webpki-tokio)
run: cargo test --no-default-features --features webpki-tokio,aws-lc-rs
env:
RUST_BACKTRACE: 1

- name: cargo test (debug; all features)
run: cargo test --all-features
- name: cargo test (debug; http)
run: cargo test -F http1,http2
env:
RUST_BACKTRACE: 1

Expand Down
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ hyper-util = { version = "0.1", default-features = false, features = ["client-le
log = { version = "0.4.4", optional = true }
pki-types = { package = "rustls-pki-types", version = "1" }
rustls-native-certs = { version = "0.7", optional = true }
rustls-platform-verifier = { version = "0.2", optional = true }
rustls-platform-verifier = { version = "0.3", optional = true }
rustls = { version = "0.23", default-features = false }
tokio = "1.0"
tokio-rustls = { version = "0.26", default-features = false }
Expand All @@ -33,8 +33,9 @@ rustls-pemfile = "2"
tokio = { version = "1.0", features = ["io-std", "macros", "net", "rt-multi-thread"] }

[features]
default = ["native-tokio", "http1", "tls12", "logging", "ring"]
aws-lc-rs = ["rustls/aws_lc_rs"]
default = ["native-tokio", "http1", "tls12", "logging", "aws_lc_rs"]
aws_lc_rs = ["rustls/aws_lc_rs"]
aws-lc-rs = ["aws_lc_rs"] # Alias because Cargo features commonly use `-`
http1 = ["hyper-util/http1"]
http2 = ["hyper-util/http2"]
webpki-tokio = ["webpki-roots"]
Expand Down
6 changes: 3 additions & 3 deletions src/connector/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl ConnectorBuilder<WantsTlsConfig> {
/// Use rustls' default crypto provider and other defaults, and the platform verifier
///
/// See [`ConfigBuilderExt::with_platform_verifier()`].
#[cfg(all(feature = "ring", feature = "rustls-platform-verifier"))]
#[cfg(feature = "rustls-platform-verifier")]
pub fn with_platform_verifier(self) -> ConnectorBuilder<WantsSchemes> {
self.with_tls_config(
ClientConfig::builder()
Expand All @@ -67,7 +67,7 @@ impl ConnectorBuilder<WantsTlsConfig> {
/// native roots.
///
/// See [`ConfigBuilderExt::with_native_roots`]
#[cfg(all(feature = "ring", feature = "rustls-native-certs"))]
#[cfg(feature = "rustls-native-certs")]
pub fn with_native_roots(self) -> std::io::Result<ConnectorBuilder<WantsSchemes>> {
Ok(self.with_tls_config(
ClientConfig::builder()
Expand Down Expand Up @@ -97,7 +97,7 @@ impl ConnectorBuilder<WantsTlsConfig> {
/// safe defaults.
///
/// See [`ConfigBuilderExt::with_webpki_roots`]
#[cfg(all(feature = "ring", feature = "webpki-roots"))]
#[cfg(feature = "webpki-roots")]
pub fn with_webpki_roots(self) -> ConnectorBuilder<WantsSchemes> {
self.with_tls_config(
ClientConfig::builder()
Expand Down

0 comments on commit cdf1343

Please sign in to comment.