Skip to content

Commit

Permalink
Update rcgen to 0.13.1
Browse files Browse the repository at this point in the history
  • Loading branch information
patowen authored and Ralith committed Apr 22, 2024
1 parent 1fc63f4 commit fd69b55
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ fn main() {
UdpSocket::bind("[::1]:0".parse::<SocketAddr>().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");
Expand Down
2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
6 changes: 3 additions & 3 deletions server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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))
}
};
Expand Down

0 comments on commit fd69b55

Please sign in to comment.