mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
mark generate_key as blocking
This commit is contained in:
@@ -174,7 +174,9 @@ async fn generate_keypair(context: &Context) -> Result<KeyPair> {
|
|||||||
let keytype = KeyGenType::from_i32(context.get_config_int(Config::KeyGenType).await)
|
let keytype = KeyGenType::from_i32(context.get_config_int(Config::KeyGenType).await)
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
info!(context, "Generating keypair with type {}", keytype);
|
info!(context, "Generating keypair with type {}", keytype);
|
||||||
let keypair = crate::pgp::create_keypair(addr, keytype)?;
|
let keypair =
|
||||||
|
async_std::task::spawn_blocking(move || crate::pgp::create_keypair(addr, keytype))
|
||||||
|
.await?;
|
||||||
store_self_keypair(context, &keypair, KeyPairUse::Default).await?;
|
store_self_keypair(context, &keypair, KeyPairUse::Default).await?;
|
||||||
info!(
|
info!(
|
||||||
context,
|
context,
|
||||||
|
|||||||
Reference in New Issue
Block a user