diff --git a/actix-tls/Cargo.toml b/actix-tls/Cargo.toml index cb90fb7f..7d4cf563 100644 --- a/actix-tls/Cargo.toml +++ b/actix-tls/Cargo.toml @@ -131,7 +131,7 @@ bytes = "1" pretty_env_logger = "0.5" futures-util = { version = "0.3.17", default-features = false, features = ["sink"] } itertools = "0.13" -rcgen = "0.12" +rcgen = "0.13" rustls-pemfile = "2" tokio-rustls-026 = { package = "tokio-rustls", version = "0.26" } trust-dns-resolver = "0.23" diff --git a/actix-tls/tests/accept-openssl.rs b/actix-tls/tests/accept-openssl.rs index 217e8e5d..41fb1d7b 100644 --- a/actix-tls/tests/accept-openssl.rs +++ b/actix-tls/tests/accept-openssl.rs @@ -21,12 +21,12 @@ use rustls_pki_types_1::ServerName; use tokio_rustls_026::rustls::RootCertStore; fn new_cert_and_key() -> (String, String) { - let cert = + let rcgen::CertifiedKey { cert, key_pair } = rcgen::generate_simple_self_signed(vec!["127.0.0.1".to_owned(), "localhost".to_owned()]) .unwrap(); - let key = cert.serialize_private_key_pem(); - let cert = cert.serialize_pem().unwrap(); + let key = key_pair.serialize_pem(); + let cert = cert.pem(); (cert, key) } diff --git a/actix-tls/tests/accept-rustls.rs b/actix-tls/tests/accept-rustls.rs index bc29971c..f31606e7 100644 --- a/actix-tls/tests/accept-rustls.rs +++ b/actix-tls/tests/accept-rustls.rs @@ -24,12 +24,12 @@ use rustls_pki_types_1::PrivateKeyDer; use tls_openssl::ssl::SslVerifyMode; fn new_cert_and_key() -> (String, String) { - let cert = + let rcgen::CertifiedKey { cert, key_pair } = rcgen::generate_simple_self_signed(vec!["127.0.0.1".to_owned(), "localhost".to_owned()]) .unwrap(); - let key = cert.serialize_private_key_pem(); - let cert = cert.serialize_pem().unwrap(); + let key = key_pair.serialize_pem(); + let cert = cert.pem(); (cert, key) }