Skip to content

Commit c3bb499

Browse files
committed
Cargo: add aws-lc-rs/aws_lc_rs cargo aliases
1 parent 8313919 commit c3bb499

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ tokio = { version = "1.0", features = ["io-std", "macros", "net", "rt-multi-thre
3434

3535
[features]
3636
default = ["native-tokio", "http1", "tls12", "logging", "ring"]
37-
aws-lc-rs = ["rustls/aws_lc_rs"]
37+
aws_lc_rs = ["rustls/aws_lc_rs"]
38+
aws-lc-rs = ["aws_lc_rs"] # Alias because Cargo features commonly use `-`
3839
http1 = ["hyper-util/http1"]
3940
http2 = ["hyper-util/http2"]
4041
webpki-tokio = ["webpki-roots"]

examples/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async fn run_client() -> io::Result<()> {
2929
// Set a process wide default crypto provider.
3030
#[cfg(feature = "ring")]
3131
let _ = rustls::crypto::ring::default_provider().install_default();
32-
#[cfg(feature = "aws-lc-rs")]
32+
#[cfg(feature = "aws_lc_rs")]
3333
let _ = rustls::crypto::aws_lc_rs::default_provider().install_default();
3434

3535
// First parameter is target URL (mandatory).

examples/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async fn run_server() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
3737
// Set a process wide default crypto provider.
3838
#[cfg(feature = "ring")]
3939
let _ = rustls::crypto::ring::default_provider().install_default();
40-
#[cfg(feature = "aws-lc-rs")]
40+
#[cfg(feature = "aws_lc_rs")]
4141
let _ = rustls::crypto::aws_lc_rs::default_provider().install_default();
4242

4343
// First parameter is port number (optional, defaults to 1337)

src/connector/builder.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl ConnectorBuilder<WantsTlsConfig> {
5858
///
5959
/// See [`ConfigBuilderExt::with_platform_verifier()`].
6060
#[cfg(all(
61-
any(feature = "ring", feature = "aws-lc-rs"),
61+
any(feature = "ring", feature = "aws_lc_rs"),
6262
feature = "rustls-platform-verifier"
6363
))]
6464
pub fn with_platform_verifier(self) -> ConnectorBuilder<WantsSchemes> {
@@ -74,7 +74,7 @@ impl ConnectorBuilder<WantsTlsConfig> {
7474
///
7575
/// See [`ConfigBuilderExt::with_native_roots`]
7676
#[cfg(all(
77-
any(feature = "ring", feature = "aws-lc-rs"),
77+
any(feature = "ring", feature = "aws_lc_rs"),
7878
feature = "rustls-native-certs"
7979
))]
8080
pub fn with_native_roots(self) -> std::io::Result<ConnectorBuilder<WantsSchemes>> {
@@ -106,7 +106,7 @@ impl ConnectorBuilder<WantsTlsConfig> {
106106
/// safe defaults.
107107
///
108108
/// See [`ConfigBuilderExt::with_webpki_roots`]
109-
#[cfg(all(any(feature = "ring", feature = "aws-lc-rs"), feature = "webpki-roots"))]
109+
#[cfg(all(any(feature = "ring", feature = "aws_lc_rs"), feature = "webpki-roots"))]
110110
pub fn with_webpki_roots(self) -> ConnectorBuilder<WantsSchemes> {
111111
self.with_tls_config(
112112
ClientConfig::builder()
@@ -324,7 +324,7 @@ mod tests {
324324
fn ensure_global_state() {
325325
#[cfg(feature = "ring")]
326326
let _ = rustls::crypto::ring::default_provider().install_default();
327-
#[cfg(feature = "aws-lc-rs")]
327+
#[cfg(feature = "aws_lc_rs")]
328328
let _ = rustls::crypto::aws_lc_rs::default_provider().install_default();
329329
}
330330

0 commit comments

Comments
 (0)