diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2020-05-12 18:29:36 -0400 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2020-05-22 22:11:33 -0300 |
commit | 2b108728c429408c5bf86f1852a205588821286e (patch) | |
tree | 180267b41843d8b01cc949f44be836b3f7acc623 /mime-node.c | |
parent | 1b9f4a9863003955e6a757a6eeb8b6926d60c896 (diff) |
crypto: Make _notmuch_crypto_decrypt take a GMimeObject
As we prepare to handle S/MIME-encrypted PKCS#7 EnvelopedData (which
is not multipart), we don't want to be limited to passing only
GMimeMultipartEncrypted MIME parts to _notmuch_crypto_decrypt.
There is no functional change here, just a matter of adjusting how we
pass arguments internally.
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Diffstat (limited to 'mime-node.c')
-rw-r--r-- | mime-node.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mime-node.c b/mime-node.c index b6431e3b..c2ee858d 100644 --- a/mime-node.c +++ b/mime-node.c @@ -253,7 +253,6 @@ node_decrypt_and_verify (mime_node_t *node, GMimeObject *part) GError *err = NULL; GMimeDecryptResult *decrypt_result = NULL; notmuch_status_t status; - GMimeMultipartEncrypted *encrypteddata = GMIME_MULTIPART_ENCRYPTED (part); notmuch_message_t *message = NULL; if (! node->unwrapped_child) { @@ -266,7 +265,7 @@ node_decrypt_and_verify (mime_node_t *node, GMimeObject *part) node->unwrapped_child = _notmuch_crypto_decrypt (&node->decrypt_attempted, node->ctx->crypto->decrypt, message, - encrypteddata, &decrypt_result, &err); + part, &decrypt_result, &err); if (node->unwrapped_child) set_unwrapped_child_destructor (node); } |