-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add aws-lc-rs as optional rustls backend
This has a few benefits. Primarily this gives us a reasonable path to creating FIPS-enabled builds on architectures other than x86-64, as well as a path away from using BoringSSL as a backend. Additionally, rustls has been using the aws-lc-rs library as the default backend for a little while now, so this gives us the opportunity to stay in line with the most widely used option in the ecosystem. Signed-off-by: Scott Fleener <[email protected]>
- Loading branch information
Showing
12 changed files
with
178 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#[cfg(feature = "aws-lc")] | ||
mod aws_lc; | ||
#[cfg(feature = "ring")] | ||
mod ring; | ||
|
||
#[cfg(feature = "aws-lc")] | ||
pub use aws_lc::{default_provider, SUPPORTED_SIG_ALGS, TLS_SUPPORTED_CIPHERSUITES}; | ||
#[cfg(all(not(feature = "aws-lc"), feature = "ring"))] | ||
pub use ring::{default_provider, SUPPORTED_SIG_ALGS, TLS_SUPPORTED_CIPHERSUITES}; | ||
#[cfg(all(not(feature = "aws-lc"), not(feature = "ring")))] | ||
compile_error!("No rustls backend enabled. Enabled one of the \"ring\" or \"aws-lc\" features"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
pub use aws_lc_rs::default_provider; | ||
use tokio_rustls::rustls::{ | ||
self, | ||
crypto::{aws_lc_rs, WebPkiSupportedAlgorithms}, | ||
}; | ||
|
||
pub static TLS_SUPPORTED_CIPHERSUITES: &[rustls::SupportedCipherSuite] = | ||
&[rustls::crypto::aws_lc_rs::cipher_suite::TLS13_CHACHA20_POLY1305_SHA256]; | ||
pub static SUPPORTED_SIG_ALGS: &WebPkiSupportedAlgorithms = &WebPkiSupportedAlgorithms { | ||
all: &[webpki::aws_lc_rs::ECDSA_P256_SHA256], | ||
mapping: &[( | ||
crate::creds::params::SIGNATURE_ALG_RUSTLS_SCHEME, | ||
&[webpki::aws_lc_rs::ECDSA_P256_SHA256], | ||
)], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
pub use ring::default_provider; | ||
use tokio_rustls::rustls::{ | ||
self, | ||
crypto::{ring, WebPkiSupportedAlgorithms}, | ||
}; | ||
|
||
pub static TLS_SUPPORTED_CIPHERSUITES: &[rustls::SupportedCipherSuite] = | ||
&[rustls::crypto::ring::cipher_suite::TLS13_CHACHA20_POLY1305_SHA256]; | ||
pub static SUPPORTED_SIG_ALGS: &WebPkiSupportedAlgorithms = &WebPkiSupportedAlgorithms { | ||
all: &[webpki::ring::ECDSA_P256_SHA256], | ||
mapping: &[( | ||
crate::creds::params::SIGNATURE_ALG_RUSTLS_SCHEME, | ||
&[webpki::ring::ECDSA_P256_SHA256], | ||
)], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters