diff options
author | Jameson Graef Rollins <jrollins@finestructure.net> | 2012-05-26 11:45:45 -0700 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2012-06-10 20:09:09 -0300 |
commit | b2c8fdee53a1b06dd19fafe23e53ac8555d294af (patch) | |
tree | e424d4388245ed4f28b6d828f73baee0a5f8fcd2 /mime-node.c | |
parent | 90822ffdb830060c6f1d73ad1f6c7964c9f20ad4 (diff) |
cli: new crypto verify flag to handle verification
Use this flag rather than depend on the existence of an initialized
gpgctx, to determine whether we should verify a multipart/signed. We
will be moving to create the ctx lazily, so we don't want to depend on
it being previously initialized if it's not needed.
Diffstat (limited to 'mime-node.c')
-rw-r--r-- | mime-node.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mime-node.c b/mime-node.c index a838224e..73e28c57 100644 --- a/mime-node.c +++ b/mime-node.c @@ -183,8 +183,7 @@ _mime_node_create (mime_node_t *parent, GMimeObject *part) } /* Handle PGP/MIME parts */ - if (GMIME_IS_MULTIPART_ENCRYPTED (part) - && node->ctx->crypto->gpgctx && node->ctx->crypto->decrypt) { + if (GMIME_IS_MULTIPART_ENCRYPTED (part) && node->ctx->crypto->decrypt) { if (node->nchildren != 2) { /* this violates RFC 3156 section 4, so we won't bother with it. */ fprintf (stderr, "Error: %d part(s) for a multipart/encrypted " @@ -218,7 +217,7 @@ _mime_node_create (mime_node_t *parent, GMimeObject *part) (err ? err->message : "no error explanation given")); } } - } else if (GMIME_IS_MULTIPART_SIGNED (part) && node->ctx->crypto->gpgctx) { + } else if (GMIME_IS_MULTIPART_SIGNED (part) && node->ctx->crypto->verify) { if (node->nchildren != 2) { /* this violates RFC 3156 section 5, so we won't bother with it. */ fprintf (stderr, "Error: %d part(s) for a multipart/signed message " |