Skip to content

Commit

Permalink
Generate PQ keys ahead of time on first connections
Browse files Browse the repository at this point in the history
  • Loading branch information
buggmagnet committed Jan 10, 2025
1 parent b583cb8 commit 018c1a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mullvad-ios/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub static CONFIG_SERVICE_PORT: u16 = talpid_tunnel_config_client::CONFIG_SERVIC

mod ios {
use std::sync::OnceLock;
use talpid_tunnel_config_client::classic_mceliece::spawn_keypair_generator;
use tokio::runtime::{Builder, Handle, Runtime};

static RUNTIME: OnceLock<Result<Runtime, String>> = OnceLock::new();
Expand All @@ -26,7 +27,11 @@ mod ios {
.build()
.map_err(|error| ToString::to_string(&error))
}) {
Ok(runtime) => Ok(runtime.handle().clone()),
Ok(runtime) => {
let _guard = runtime.enter();
spawn_keypair_generator();
Ok(runtime.handle().clone())
}
Err(error) => Err(error.clone()),
}
}
Expand Down

0 comments on commit 018c1a7

Please sign in to comment.