mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 21:36: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
@@ -342,10 +342,10 @@ impl MimeMessage {
|
||||
let mail_raw; // Memory location for a possible decrypted message.
|
||||
let decrypted_msg; // Decrypted signed OpenPGP message.
|
||||
|
||||
let (mail, encrypted) =
|
||||
let (mail, is_encrypted) =
|
||||
match tokio::task::block_in_place(|| try_decrypt(&mail, &private_keyring)) {
|
||||
Ok(Some(msg)) => {
|
||||
mail_raw = msg.get_content()?.unwrap_or_default();
|
||||
Ok(Some(mut msg)) => {
|
||||
mail_raw = msg.as_data_vec().unwrap_or_default();
|
||||
|
||||
let decrypted_mail = mailparse::parse_mail(&mail_raw)?;
|
||||
if std::env::var(crate::DCC_MIME_DEBUG).is_ok() {
|
||||
@@ -434,7 +434,7 @@ impl MimeMessage {
|
||||
signatures.extend(signatures_detached);
|
||||
content
|
||||
});
|
||||
if let (Ok(mail), true) = (mail, encrypted) {
|
||||
if let (Ok(mail), true) = (mail, is_encrypted) {
|
||||
if !signatures.is_empty() {
|
||||
// Remove unsigned opportunistically protected headers from messages considered
|
||||
// Autocrypt-encrypted / displayed with padlock.
|
||||
@@ -529,7 +529,7 @@ impl MimeMessage {
|
||||
}
|
||||
}
|
||||
}
|
||||
if !encrypted {
|
||||
if !is_encrypted {
|
||||
signatures.clear();
|
||||
}
|
||||
if let Some(peerstate) = &mut peerstate {
|
||||
|
||||
Reference in New Issue
Block a user