Since `parent` is not really used as a parent, I use it as the last
visited encrypted part while going down the parts-tree.

At the decryption of a part (`mu_msg_crypto_decrypt_part`) I check,
through the GMimeDecryptResult, for signatures (`check_decrypt_result`)
and add them to the part (`tag_with_sig_status`).  Any nested parts hold
that encrypted part as their parent.  Finally at `handle_part`, for each
part I check if it a descendent of an encrypted part.  If so, I proceed
checking for signatures and adding them to the `msgpart`.
This commit is contained in:
Foivos S. Zakkak
2015-02-15 00:07:38 +02:00
parent 9799d76fdb
commit 8456c1c2dc
4 changed files with 72 additions and 44 deletions

View File

@ -115,10 +115,9 @@ typedef char* (*MuMsgPartPasswordFunc) (const char *user_id, const char *promp
*
* @return a status report object, free with mu_msg_part_sig_status_report_destroy
*/
MuMsgPartSigStatusReport* mu_msg_crypto_verify_part (GMimeMultipartSigned *sig,
MuMsgOptions opts,
GError **err)
G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
void mu_msg_crypto_verify_part (GMimeMultipartSigned *sig,
MuMsgOptions opts,
GError **err);
/**
* decrypt the given encrypted mime multipart