Skip to content

Commit

Permalink
Cargo: make aws_lc_rs the default crypto provider
Browse files Browse the repository at this point in the history
  • Loading branch information
cpu committed Mar 25, 2024
1 parent c3bb499 commit 3b477de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ jobs:
env:
RUST_BACKTRACE: 1

- name: cargo test (debug; defaults+aws-lc-rs)
run: cargo test --no-default-features --features aws-lc-rs,native-tokio,http1,tls12,logging
- name: cargo test (debug; defaults+ring)
run: cargo test --no-default-features --features ring,native-tokio,http1,tls12,logging
env:
RUST_BACKTRACE: 1

Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ rustls-pemfile = "2"
tokio = { version = "1.0", features = ["io-std", "macros", "net", "rt-multi-thread"] }

[features]
default = ["native-tokio", "http1", "tls12", "logging", "ring"]
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"]
Expand All @@ -52,7 +52,7 @@ required-features = ["native-tokio", "http1"]
[[example]]
name = "server"
path = "examples/server.rs"
required-features = ["ring"]
required-features = ["aws_lc_rs"]

[package.metadata.docs.rs]
all-features = true
Expand Down
4 changes: 2 additions & 2 deletions src/connector/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ use crate::config::ConfigBuilderExt;
/// ```
/// use hyper_rustls::HttpsConnectorBuilder;
///
/// # #[cfg(all(feature = "webpki-roots", feature = "http1", feature="ring"))]
/// # #[cfg(all(feature = "webpki-roots", feature = "http1", feature="aws_lc_rs"))]
/// # {
/// # let _ = rustls::crypto::ring::default_provider().install_default();
/// # let _ = rustls::crypto::aws_lc_rs::default_provider().install_default();
/// let https = HttpsConnectorBuilder::new()
/// .with_webpki_roots()
/// .https_only()
Expand Down

0 comments on commit 3b477de

Please sign in to comment.