diff --git a/Cargo.toml b/Cargo.toml index 1242370..d7d0066 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,7 @@ rustls = { version = "0.23", default-features = false } [dev-dependencies] actix-web = { version = "4.6.0", features = ["rustls-0_23"] } criterion = "0.5" +rustls = "0.23" rustls-pemfile = "2.0.0" tokio = { version = "1.35.1", features = ["fs"] } diff --git a/benches/parallel_access.rs b/benches/parallel_access.rs index e3bf8bc..af6a82f 100644 --- a/benches/parallel_access.rs +++ b/benches/parallel_access.rs @@ -22,7 +22,7 @@ fn prepare_key() -> CertifiedKey { let mut reader = BufReader::new(keyfile); let private_key = rustls_pemfile::private_key(&mut reader).unwrap().unwrap(); - let private_key = rustls::crypto::ring::sign::any_supported_type(&private_key).unwrap(); + let private_key = rustls::crypto::aws_lc_rs::sign::any_supported_type(&private_key).unwrap(); CertifiedKey::new(certs, private_key) } diff --git a/examples/demo.rs b/examples/demo.rs index bc58391..5c53460 100644 --- a/examples/demo.rs +++ b/examples/demo.rs @@ -8,6 +8,10 @@ async fn index() -> &'static str { #[actix_web::main] async fn main() -> Result<(), Box> { + rustls::crypto::aws_lc_rs::default_provider() + .install_default() + .expect("Set provider"); + let initial_key = read_key().await?.unwrap(); let (tx, rx) = rustls_channel_resolver::channel::<32>(initial_key); @@ -33,7 +37,7 @@ async fn main() -> Result<(), Box> { .with_cert_resolver(rx); HttpServer::new(|| App::new().route("/", web::get().to(index))) - .bind_rustls_0_22("0.0.0.0:8443", server_config)? + .bind_rustls_0_23("0.0.0.0:8443", server_config)? .bind("0.0.0.0:8080")? .run() .await?; @@ -52,7 +56,7 @@ async fn read_key() -> Result, Box