Revert "Do not handle signature parts after verification"
This reverts commit 6e9b9ad2d0.
Unfortunately the reverted commit breaks the Signature field for
encrypted and, at the same time, signed messages.
TODO: details button in the Signatures field does not work for such
cases because the signature is encrypted.
Conflicts:
lib/mu-msg-part.c
This commit is contained in:
@ -452,9 +452,9 @@ handle_part (MuMsg *msg, GMimePart *part, GMimeObject *parent,
|
|||||||
msgpart.part_type |= MU_MSG_PART_TYPE_TEXT_HTML;
|
msgpart.part_type |= MU_MSG_PART_TYPE_TEXT_HTML;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* put the verification info in the signed part */
|
/* put the verification info in the pgp-signature part */
|
||||||
msgpart.sig_status_report = NULL;
|
msgpart.sig_status_report = NULL;
|
||||||
if ((opts & MU_MSG_OPTION_VERIFY) && GMIME_IS_MULTIPART_SIGNED (parent))
|
if (g_ascii_strcasecmp (msgpart.subtype, "pgp-signature") == 0)
|
||||||
msgpart.sig_status_report =
|
msgpart.sig_status_report =
|
||||||
(MuMsgPartSigStatusReport*)
|
(MuMsgPartSigStatusReport*)
|
||||||
g_object_get_data (G_OBJECT(parent), SIG_STATUS_REPORT);
|
g_object_get_data (G_OBJECT(parent), SIG_STATUS_REPORT);
|
||||||
@ -543,17 +543,15 @@ handle_mime_object (MuMsg *msg, GMimeObject *mobj, GMimeObject *parent,
|
|||||||
parent, opts, index, decrypted, func, user_data);
|
parent, opts, index, decrypted, func, user_data);
|
||||||
else if ((opts & MU_MSG_OPTION_VERIFY) &&
|
else if ((opts & MU_MSG_OPTION_VERIFY) &&
|
||||||
GMIME_IS_MULTIPART_SIGNED (mobj)) {
|
GMIME_IS_MULTIPART_SIGNED (mobj)) {
|
||||||
gboolean verified, signedpart;
|
gboolean verified, multipart;
|
||||||
|
|
||||||
verified = check_signature
|
verified = check_signature
|
||||||
(msg, GMIME_MULTIPART_SIGNED (mobj), opts);
|
(msg, GMIME_MULTIPART_SIGNED (mobj), opts);
|
||||||
|
multipart = handle_multipart
|
||||||
|
(msg, GMIME_MULTIPART (mobj), opts,
|
||||||
|
index, decrypted, func, user_data);
|
||||||
|
|
||||||
// Only process the first part (the second one is the signature)
|
return verified && multipart;
|
||||||
signedpart = handle_mime_object
|
|
||||||
(msg, g_mime_multipart_get_part (GMIME_MULTIPART (mobj), 0),
|
|
||||||
mobj, opts, index, decrypted, func, user_data);
|
|
||||||
|
|
||||||
return verified && signedpart;
|
|
||||||
} else if ((opts & MU_MSG_OPTION_DECRYPT) &&
|
} else if ((opts & MU_MSG_OPTION_DECRYPT) &&
|
||||||
GMIME_IS_MULTIPART_ENCRYPTED (mobj))
|
GMIME_IS_MULTIPART_ENCRYPTED (mobj))
|
||||||
return handle_encrypted_part
|
return handle_encrypted_part
|
||||||
|
|||||||
Reference in New Issue
Block a user