diff --git a/client/Cargo.toml b/client/Cargo.toml index 52b29a5e..bfe13572 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -34,7 +34,7 @@ futures-util = "0.3.1" rustls = { version = "0.21.7", features = ["dangerous_configuration"] } webpki = "0.22.0" hecs = { workspace = true } -rcgen = { version = "0.12.1", default-features = false, features = ["ring"] } +rcgen = { version = "0.13.1", default-features = false, features = ["ring"] } memoffset = "0.9" gltf = { version = "1.0.0", default-features = false, features = ["utils"] } metrics = "0.22.1" diff --git a/client/src/main.rs b/client/src/main.rs index 916ece08..34071c3a 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -23,9 +23,9 @@ fn main() { UdpSocket::bind("[::1]:0".parse::().unwrap()).expect("binding socket"); config.server = Some(socket.local_addr().unwrap()); - let cert = rcgen::generate_simple_self_signed(vec!["localhost".into()]).unwrap(); - let key = cert.serialize_private_key_der(); - let cert = cert.serialize_der().unwrap(); + let certified_key = rcgen::generate_simple_self_signed(vec!["localhost".into()]).unwrap(); + let key = certified_key.key_pair.serialize_der(); + let cert = certified_key.cert.der().to_vec(); let sim_cfg = config.local_simulation.clone(); let save = dirs.data_local_dir().join("default.save"); diff --git a/server/Cargo.toml b/server/Cargo.toml index 283a2657..28b656d9 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -18,7 +18,7 @@ quinn = { workspace = true } serde = { version = "1.0.104", features = ["derive", "rc"] } toml = { workspace = true } anyhow = "1.0.26" -rcgen = { version = "0.12.1", default-features = false, features = ["ring"] } +rcgen = { version = "0.13.1", default-features = false, features = ["ring"] } hostname = "0.4.0" futures = "0.3.1" hecs = { workspace = true } diff --git a/server/src/main.rs b/server/src/main.rs index 5a5f71eb..d0d4b3c4 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -48,7 +48,7 @@ pub fn run() -> Result<()> { _ => { // TODO: Cache on disk warn!("generating self-signed certificate"); - let cert = rcgen::generate_simple_self_signed(vec![cfg + let certified_key = rcgen::generate_simple_self_signed(vec![cfg .server_name .clone() .map(Ok) @@ -59,8 +59,8 @@ pub fn run() -> Result<()> { }) })?]) .unwrap(); - let key = cert.serialize_private_key_der(); - let cert = cert.serialize_der().unwrap(); + let key = certified_key.key_pair.serialize_der(); + let cert = certified_key.cert.der().to_vec(); (vec![rustls::Certificate(cert)], rustls::PrivateKey(key)) } };