summaryrefslogtreecommitdiffstats
path: root/mime-node.c
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2019-04-20 13:02:57 -0400
committerDavid Bremner <david@tethera.net>2019-04-26 08:03:15 -0300
commitafb0b11dcd08aa9091be1d89e1c2a9fe6b0e11f0 (patch)
tree219627337f49a4d2ce5cca520239b5e7c43563aa /mime-node.c
parent325a92422737f16377307dbd584158d3ee8cdb51 (diff)
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.
Diffstat (limited to 'mime-node.c')
-rw-r--r--mime-node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mime-node.c b/mime-node.c
index 2a24e537..1bfb479b 100644
--- a/mime-node.c
+++ b/mime-node.c
@@ -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);
}