feat: Remove mostly-unused SignUnencrypted option (#8190)

This commit is contained in:
Hocuri
2026-04-30 13:59:30 +02:00
committed by GitHub
parent 4b528e426b
commit 4c01802982
9 changed files with 95 additions and 228 deletions

View File

@@ -79,16 +79,6 @@ impl EncryptHelper {
Ok(ctext)
}
/// Signs the passed-in `mail` using the private key from `context`.
/// Returns the payload and the signature.
pub async fn sign(self, context: &Context, mail: &MimePart<'static>) -> Result<String> {
let sign_key = load_self_secret_key(context).await?;
let mut buffer = Vec::new();
mail.clone().write_part(&mut buffer)?;
let signature = pgp::pk_calc_signature(buffer, &sign_key)?;
Ok(signature)
}
}
/// Ensures a private key exists for the configured user.