mirror of
https://github.com/chatmail/core.git
synced 2026-04-29 11:26:29 +03:00
build: update to rPGP 0.16.0 (#6719)
Co-authored-by: Heiko Schaefer <heiko@schaefer.name> Co-authored-by: link2xt <link2xt@testrun.org>
This commit is contained in:
committed by
GitHub
parent
42975b2ff3
commit
5c2af42cdd
@@ -143,7 +143,7 @@ impl EncryptHelper {
|
||||
let cursor = Cursor::new(&mut raw_message);
|
||||
mail_to_encrypt.clone().write_part(cursor).ok();
|
||||
|
||||
let ctext = pgp::pk_encrypt(&raw_message, keyring, Some(sign_key), compress).await?;
|
||||
let ctext = pgp::pk_encrypt(raw_message, keyring, Some(sign_key), compress).await?;
|
||||
|
||||
Ok(ctext)
|
||||
}
|
||||
@@ -153,9 +153,8 @@ impl EncryptHelper {
|
||||
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();
|
||||
let cursor = Cursor::new(&mut buffer);
|
||||
mail.clone().write_part(cursor).ok();
|
||||
let signature = pgp::pk_calc_signature(&buffer, &sign_key)?;
|
||||
mail.clone().write_part(&mut buffer)?;
|
||||
let signature = pgp::pk_calc_signature(buffer, &sign_key)?;
|
||||
Ok(signature)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user