mirror of https://github.com/fafhrd91/actix-net
test: install default crypto provider in tests
This commit is contained in:
parent
ac563193ba
commit
e2203eaeef
|
@ -34,6 +34,8 @@ pub mod reexports {
|
|||
/// Returns root certificates via `rustls-native-certs` crate as a rustls certificate store.
|
||||
///
|
||||
/// See [`rustls_native_certs::load_native_certs()`] for more info on behavior and errors.
|
||||
///
|
||||
/// [`rustls_native_certs::load_native_certs()`]: rustls_native_certs_07::load_native_certs()
|
||||
#[cfg(feature = "rustls-0_23-native-roots")]
|
||||
pub fn native_roots_cert_store() -> io::Result<tokio_rustls::rustls::RootCertStore> {
|
||||
let mut root_certs = tokio_rustls::rustls::RootCertStore::empty();
|
||||
|
|
|
@ -111,6 +111,10 @@ fn rustls_connector(_cert: String, _key: String) -> ClientConfig {
|
|||
|
||||
#[actix_rt::test]
|
||||
async fn accepts_connections() {
|
||||
tokio_rustls_026::rustls::crypto::aws_lc_rs::default_provider()
|
||||
.install_default()
|
||||
.unwrap();
|
||||
|
||||
let (cert, key) = new_cert_and_key();
|
||||
|
||||
let srv = TestServer::start({
|
||||
|
|
|
@ -73,6 +73,10 @@ fn openssl_connector(cert: String, key: String) -> SslConnector {
|
|||
|
||||
#[actix_rt::test]
|
||||
async fn accepts_connections() {
|
||||
tokio_rustls_026::rustls::crypto::aws_lc_rs::default_provider()
|
||||
.install_default()
|
||||
.unwrap();
|
||||
|
||||
let (cert, key) = new_cert_and_key();
|
||||
|
||||
let srv = TestServer::start({
|
||||
|
|
Loading…
Reference in New Issue