mirror of
https://git.asonix.dog/asonix/relay.git
synced 2024-11-25 11:01:11 +00:00
Precompute private key biguints
This commit is contained in:
parent
84a396fc1e
commit
45349f3252
1 changed files with 7 additions and 1 deletions
|
@ -171,7 +171,13 @@ impl State {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let (blocks, whitelists, listeners, private_key) = try_join!(f1, f2, f3, f4)?;
|
let (blocks, whitelists, listeners, mut private_key) = try_join!(f1, f2, f3, f4)?;
|
||||||
|
|
||||||
|
let private_key: RSAPrivateKey = web::block(move || {
|
||||||
|
private_key.precompute();
|
||||||
|
Ok(private_key) as Result<_, std::convert::Infallible>
|
||||||
|
})
|
||||||
|
.await?;
|
||||||
|
|
||||||
let public_key = private_key.to_public_key();
|
let public_key = private_key.to_public_key();
|
||||||
let listeners = Arc::new(RwLock::new(listeners));
|
let listeners = Arc::new(RwLock::new(listeners));
|
||||||
|
|
Loading…
Reference in a new issue