summaryrefslogtreecommitdiffstats
path: root/mime-node.c
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2017-12-08 01:23:58 -0500
committerDavid Bremner <david@tethera.net>2017-12-08 08:08:46 -0400
commitd137170b23f8ccd9f967445e101d6f694df1cad4 (patch)
treea9d783de0ce8bcfcd59f49703e82adb5c8c240ff /mime-node.c
parent181d4091c408b8ca014ec245ecdae602942b70ce (diff)
crypto: record whether an actual decryption attempt happened
In our consolidation of _notmuch_crypto_decrypt, the callers lost track a little bit of whether any actual decryption was attempted. Now that we have the more-subtle "auto" policy, it's possible that _notmuch_crypto_decrypt could be called without having any actual decryption take place. This change lets the callers be a little bit smarter about whether or not any decryption was actually attempted.
Diffstat (limited to 'mime-node.c')
-rw-r--r--mime-node.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mime-node.c b/mime-node.c
index 49d668fe..11df082b 100644
--- a/mime-node.c
+++ b/mime-node.c
@@ -204,8 +204,8 @@ node_decrypt_and_verify (mime_node_t *node, GMimeObject *part,
if (parent->envelope_file)
break;
- node->decrypt_attempted = true;
- node->decrypted_child = _notmuch_crypto_decrypt (node->ctx->crypto->decrypt,
+ node->decrypted_child = _notmuch_crypto_decrypt (&node->decrypt_attempted,
+ node->ctx->crypto->decrypt,
parent ? parent->envelope_file : NULL,
cryptoctx, encrypteddata, &decrypt_result, &err);
}