mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
crypto: Avoid pretending to verify signatures on unsigned encrypted mail
Unsigned encrypted mail shows up with a weird empty signature list. If we successfully decrypted and there was no signature in it, we should just not show a sigstatus at all. The documentation for g_mime_decrypt_result_get_signatures says: a GMimeSignatureList or NULL if the stream was not signed.
This commit is contained in:
parent
325a924227
commit
afb0b11dcd
2 changed files with 1 additions and 2 deletions
|
@ -218,12 +218,12 @@ node_decrypt_and_verify (mime_node_t *node, GMimeObject *part,
|
|||
}
|
||||
|
||||
node->decrypt_success = true;
|
||||
node->verify_attempted = true;
|
||||
|
||||
if (decrypt_result) {
|
||||
/* This may be NULL if the part is not signed. */
|
||||
node->sig_list = g_mime_decrypt_result_get_signatures (decrypt_result);
|
||||
if (node->sig_list) {
|
||||
node->verify_attempted = true;
|
||||
g_object_ref (node->sig_list);
|
||||
set_signature_list_destructor (node);
|
||||
}
|
||||
|
|
|
@ -269,7 +269,6 @@ expected='[[[{"id": "XXXXX",
|
|||
"Date": "Sat, 01 Jan 2000 12:00:00 +0000"},
|
||||
"body": [{"id": 1,
|
||||
"encstatus": [{"status": "good"}],
|
||||
"sigstatus": [],
|
||||
"content-type": "multipart/encrypted",
|
||||
"content": [{"id": 2,
|
||||
"content-type": "application/pgp-encrypted",
|
||||
|
|
Loading…
Reference in a new issue