1 Return-Path: <aperez@igalia.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 47473429E35
\r
6 for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 02:46:05 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id zmvkwppDBWQ0 for <notmuch@notmuchmail.org>;
\r
16 Tue, 17 Jan 2012 02:46:01 -0800 (PST)
\r
17 Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 381A6429E2F
\r
19 for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 02:46:00 -0800 (PST)
\r
20 X-IronPort-Anti-Spam-Filtered: true
\r
21 X-IronPort-Anti-Spam-Result: Ap8EAANRFU9bdWOb/2dsb2JhbABCAoURpyuCC4FyAQEFIwQvMwsYCQ0UAgIPASkNERmHfAakVZFiiQcXQgEFCAUEEQUBBgEBBgEFLQIBCQEBAS4KTQ0FGBEKgWkCBgE3EQsBgX6BFgSVEZJD
\r
22 X-IronPort-AV: E=Sophos;i="4.71,522,1320620400"; d="scan'208";a="862337471"
\r
23 Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com)
\r
25 by smtp4.mundo-r.com with ESMTP; 17 Jan 2012 11:45:58 +0100
\r
26 Received: from dsl-hkibrasgw3-fe7cfb00-20.dhcp.inet.fi ([84.251.124.20]
\r
27 helo=kaze.ara-ara.org) by fanzine.igalia.com with esmtpsa
\r
28 (Cipher TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim) id 1Rn6Y9-0003E3-Vm
\r
29 for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 11:45:58 +0100
\r
30 Received: (nullmailer pid 975 invoked by uid 1000);
\r
31 Tue, 17 Jan 2012 10:48:18 -0000
\r
32 From: Adrian Perez <aperez@igalia.com>
\r
33 To: notmuch@notmuchmail.org
\r
34 Subject: Re: [PATCH] Add pseudo-compatibility with gmime 2.6
\r
35 In-Reply-To: <20120117034714.GG16740@mit.edu>
\r
36 References: <8762gbtd6p.fsf@schnouki.net>
\r
37 <1326758199-18058-1-git-send-email-schnouki@schnouki.net>
\r
38 <20120117034714.GG16740@mit.edu>
\r
39 User-Agent: Notmuch/0.11 (http://notmuchmail.org) Emacs/23.3.1
\r
40 (x86_64-unknown-linux-gnu)
\r
41 Date: Tue, 17 Jan 2012 12:48:14 +0200
\r
42 Message-ID: <87ty3u38r5.fsf@igalia.com>
\r
44 Content-Type: multipart/signed; boundary="=-=-=";
\r
45 micalg=pgp-sha1; protocol="application/pgp-signature"
\r
46 X-BeenThere: notmuch@notmuchmail.org
\r
47 X-Mailman-Version: 2.1.13
\r
49 List-Id: "Use and development of the notmuch mail system."
\r
50 <notmuch.notmuchmail.org>
\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
54 List-Post: <mailto:notmuch@notmuchmail.org>
\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
58 X-List-Received-Date: Tue, 17 Jan 2012 10:46:05 -0000
\r
61 Content-Type: text/plain; charset=utf-8
\r
62 Content-Transfer-Encoding: quoted-printable
\r
67 Just a couple of comments inline :)
\r
69 On Mon, 16 Jan 2012 22:47:14 -0500, Austin Clements <amdragon@MIT.EDU> wrot=
\r
71 > Quoth Thomas Jost on Jan 17 at 12:56 am:
\r
72 > > There are lots of API changes in gmime 2.6 crypto handling. By adding
\r
73 > > preprocessor directives, it is however possible to add gmime 2.6 compat=
\r
75 > > while preserving compatibility with gmime 2.4 too.
\r
77 > Awesome. Comments inline below.
\r
79 > > This is mostly based on id:"8762i8hrb9.fsf@bookbinder.fernseed.info".
\r
81 > > This was tested against both gmime 2.6.4 and 2.4.31. With gmime 2.4.31,=
\r
83 > > crypto tests all work fine (as expected). With gmime 2.6.4, one crypto =
\r
85 > > fails (signature verification with signer key unavailable) but this wil=
\r
87 > > to fix since the new API does not report the reason why a signature ver=
\r
89 > > fails (other than the human-readable error message).
\r
91 > What is the result of this failing test?
\r
94 > > mime-node.c | 50 ++++++++++++++++++++++++++-
\r
95 > > notmuch-client.h | 27 ++++++++++++++-
\r
96 > > notmuch-reply.c | 7 ++++
\r
97 > > notmuch-show.c | 97 ++++++++++++++++++++++++++++++++++++++++++++++=
\r
99 > > show-message.c | 4 ++
\r
100 > > 5 files changed, 181 insertions(+), 4 deletions(-)
\r
102 > > diff --git a/mime-node.c b/mime-node.c
\r
103 > > index d26bb44..ae2473d 100644
\r
104 > > --- a/mime-node.c
\r
105 > > +++ b/mime-node.c
\r
106 > > @@ -33,7 +33,11 @@ typedef struct mime_node_context {
\r
107 > > GMimeMessage *mime_message;
\r
109 > > /* Context provided by the caller. */
\r
110 > > +#ifdef GMIME_26
\r
111 > > + GMimeCryptoContext *cryptoctx;
\r
113 > > GMimeCipherContext *cryptoctx;
\r
115 > > notmuch_bool_t decrypt;
\r
116 > > } mime_node_context_t;
\r
118 > > @@ -57,8 +61,12 @@ _mime_node_context_free (mime_node_context_t *res)
\r
120 > > notmuch_status_t
\r
121 > > mime_node_open (const void *ctx, notmuch_message_t *message,
\r
122 > > - GMimeCipherContext *cryptoctx, notmuch_bool_t decrypt,
\r
123 > > - mime_node_t **root_out)
\r
124 > > +#ifdef GMIME_26
\r
125 > > + GMimeCryptoContext *cryptoctx,
\r
127 > > + GMimeCipherContext *cryptoctx,
\r
129 > > + notmuch_bool_t decrypt, mime_node_t **root_out)
\r
131 > > const char *filename =3D notmuch_message_get_filename (message);
\r
132 > > mime_node_context_t *mctx;
\r
133 > > @@ -112,12 +120,21 @@ DONE:
\r
137 > > +#ifdef GMIME_26
\r
139 > > +_signature_list_free (GMimeSignatureList **proxy)
\r
141 > > + g_object_unref (*proxy);
\r
146 > > _signature_validity_free (GMimeSignatureValidity **proxy)
\r
148 > > g_mime_signature_validity_free (*proxy);
\r
153 > > static mime_node_t *
\r
154 > > _mime_node_create (const mime_node_t *parent, GMimeObject *part)
\r
155 > > @@ -165,11 +182,23 @@ _mime_node_create (const mime_node_t *parent, GMi=
\r
157 > > GMimeMultipartEncrypted *encrypteddata =3D
\r
158 > > GMIME_MULTIPART_ENCRYPTED (part);
\r
159 > > node->decrypt_attempted =3D TRUE;
\r
160 > > +#ifdef GMIME_26
\r
161 > > + GMimeDecryptResult *decrypt_result =3D g_mime_decrypt_result_new =
\r
164 > I think g_mime_multipart_encrypted_decrypt allocates the
\r
165 > GMimeDecryptResult for you, so this will just leak memory.
\r
167 Yes, this is a leak. The documentation says that the function is
\r
168 responsible of allocating the GMimeDecryptResult. The g_object_unref()
\r
169 is still needed in notmuch's code to free it, though.
\r
171 See http://git.gnome.org/browse/gmime/tree/gmime/gmime-multipart-encrypted.=
\r
174 > > + node->decrypted_child =3D g_mime_multipart_encrypted_decrypt
\r
175 > > + (encrypteddata, node->ctx->cryptoctx, &decrypt_result, &err);
\r
176 > > + if (node->decrypted_child) {
\r
177 > > + node->decrypt_success =3D node->verify_attempted =3D TRUE;
\r
178 > > + node->sig_list =3D g_mime_decrypt_result_get_signatures (decrypt_res=
\r
180 > > + if (!node->sig_list)
\r
181 > > + fprintf (stderr, "Failed to get signatures: %s\n",
\r
182 > > + (err ? err->message : "no error explanation given"));
\r
184 > My understanding is that g_mime_decrypt_result_get_signatures returns
\r
185 > NULL if there are no signatures and that this isn't an error. This
\r
186 > differs from 2.4, which would return an empty but non-NULL list.
\r
188 > Also, I believe you have to free the sig_list in both branches now,
\r
189 > which means the talloc_set_destructor can be moved to common logic
\r
190 > outside of the if decrypted/signed.
\r
193 > > node->decrypted_child =3D g_mime_multipart_encrypted_decrypt
\r
194 > > (encrypteddata, node->ctx->cryptoctx, &err);
\r
195 > > if (node->decrypted_child) {
\r
196 > > node->decrypt_success =3D node->verify_attempted =3D TRUE;
\r
197 > > node->sig_validity =3D g_mime_multipart_encrypted_get_signature_vali=
\r
198 dity (encrypteddata);
\r
201 > It's confusing to have the open braces in the #ifdef'd region with a
\r
202 > matching close brace outside of it (and I imagine this confuses
\r
203 > editors and uncrustify, too). You could either copy the else part in
\r
204 > both branches of the #ifdef or avoid duplicated code with something
\r
208 > .. node->decrypted_child =3D ..
\r
210 > .. node->decrypted_child =3D ..
\r
212 > if (node->decrypted_child) {
\r
213 > node->decrypt_success =3D node->verify_attempted =3D TRUE;
\r
215 > node->sig_list =3D ..
\r
217 > node->sig_validity =3D ..
\r
220 > fprintf (stderr, ..);
\r
224 > > fprintf (stderr, "Failed to decrypt part: %s\n",
\r
225 > > (err ? err->message : "no error explanation given"));
\r
226 > > @@ -182,6 +211,18 @@ _mime_node_create (const mime_node_t *parent, GMim=
\r
228 > > "(must be exactly 2)\n",
\r
229 > > node->nchildren);
\r
231 > > +#ifdef GMIME_26
\r
232 > > + GMimeSignatureList *sig_list =3D g_mime_multipart_signed_verify
\r
233 > > + (GMIME_MULTIPART_SIGNED (part), node->ctx->cryptoctx, &err);
\r
234 > > + node->verify_attempted =3D TRUE;
\r
235 > > + node->sig_list =3D sig_list;
\r
236 > > + if (sig_list) {
\r
237 > > + GMimeSignatureList **proxy =3D
\r
238 > > + talloc (node, GMimeSignatureList *);
\r
239 > > + *proxy =3D sig_list;
\r
240 > > + talloc_set_destructor (proxy, _signature_list_free);
\r
243 > > /* For some reason the GMimeSignatureValidity returned
\r
244 > > * here is not a const (inconsistent with that
\r
246 > > @@ -200,10 +241,15 @@ _mime_node_create (const mime_node_t *parent, GMi=
\r
248 > > *proxy =3D sig_validity;
\r
249 > > talloc_set_destructor (proxy, _signature_validity_free);
\r
255 > > +#ifdef GMIME_26
\r
256 > > + if (node->verify_attempted && !node->sig_list)
\r
258 > Hmm. This is correct for signed parts, but will incorrectly trigger
\r
259 > for an encrypted part with no signatures. For 2.6, I think this error
\r
260 > checking may have to move into the branches of the if encrypted/signed
\r
261 > since for encrypted parts you have to check if
\r
262 > g_mime_multipart_encrypted_decrypt returned NULL.
\r
265 > > if (node->verify_attempted && !node->sig_validity)
\r
267 > > fprintf (stderr, "Failed to verify signed part: %s\n",
\r
268 > > (err ? err->message : "no error explanation given"));
\r
270 > > diff --git a/notmuch-client.h b/notmuch-client.h
\r
271 > > index 517c010..e85f882 100644
\r
272 > > --- a/notmuch-client.h
\r
273 > > +++ b/notmuch-client.h
\r
274 > > @@ -30,6 +30,12 @@
\r
276 > > #include <gmime/gmime.h>
\r
278 > > +/* GMIME_CHECK_VERSION is only available in gmime >=3D 2.5. But so are
\r
279 > > + * GMIME_MAJOR_VERSION and friends. */
\r
283 > > +#ifdef GMIME_MAJOR_VERSION
\r
284 > > +#define GMIME_26
\r
287 > > #include "notmuch.h"
\r
289 > > /* This is separate from notmuch-private.h because we're trying to
\r
290 > > @@ -69,7 +75,11 @@ typedef struct notmuch_show_format {
\r
291 > > void (*part_start) (GMimeObject *part,
\r
292 > > int *part_count);
\r
293 > > void (*part_encstatus) (int status);
\r
294 > > +#ifdef GMIME_26
\r
295 > > + void (*part_sigstatus) (GMimeSignatureList* siglist);
\r
297 > > void (*part_sigstatus) (const GMimeSignatureValidity* validity);
\r
299 > > void (*part_content) (GMimeObject *part);
\r
300 > > void (*part_end) (GMimeObject *part);
\r
301 > > const char *part_sep;
\r
302 > > @@ -83,7 +93,11 @@ typedef struct notmuch_show_params {
\r
303 > > int entire_thread;
\r
306 > > +#ifdef GMIME_26
\r
307 > > + GMimeCryptoContext* cryptoctx;
\r
309 > > GMimeCipherContext* cryptoctx;
\r
312 > > } notmuch_show_params_t;
\r
314 > > @@ -286,7 +300,12 @@ typedef struct mime_node {
\r
315 > > * signature. May be NULL if signature verification failed. If
\r
316 > > * there are simply no signatures, this will be non-NULL with an
\r
317 > > * empty signers list. */
\r
318 > > +#ifdef GMIME_26
\r
319 > > + /* TODO: update the above comment... */
\r
321 > Since this behaves very differently in 2.6, I think documenting it is
\r
322 > important (and being very careful about the differences). Maybe
\r
324 > /* The list of signatures for signed or encrypted containers. If
\r
325 > * there are no signatures, this will be NULL. */
\r
327 > > + GMimeSignatureList* sig_list;
\r
329 > > const GMimeSignatureValidity *sig_validity;
\r
332 > > /* Internal: Context inherited from the root iterator. */
\r
333 > > struct mime_node_context *ctx;
\r
334 > > @@ -311,8 +330,12 @@ typedef struct mime_node {
\r
336 > > notmuch_status_t
\r
337 > > mime_node_open (const void *ctx, notmuch_message_t *message,
\r
338 > > - GMimeCipherContext *cryptoctx, notmuch_bool_t decrypt,
\r
339 > > - mime_node_t **node_out);
\r
340 > > +#ifdef GMIME_26
\r
341 > > + GMimeCryptoContext *cryptoctx,
\r
343 > > + GMimeCipherContext *cryptoctx,
\r
345 > > + notmuch_bool_t decrypt, mime_node_t **node_out);
\r
347 > > /* Return a new MIME node for the requested child part of parent.
\r
348 > > * parent will be used as the talloc context for the returned child
\r
349 > > diff --git a/notmuch-reply.c b/notmuch-reply.c
\r
350 > > index da3acce..dc37c51 100644
\r
351 > > --- a/notmuch-reply.c
\r
352 > > +++ b/notmuch-reply.c
\r
353 > > @@ -688,15 +688,22 @@ notmuch_reply_command (void *ctx, int argc, char =
\r
355 > > reply_format_func =3D notmuch_reply_format_default;
\r
358 > > +#ifdef GMIME_26
\r
359 > > + /* TODO: GMimePasswordRequestFunc */
\r
360 > > + params.cryptoctx =3D g_mime_gpg_context_new (NULL, "gpg");
\r
362 > > GMimeSession* session =3D g_object_new (g_mime_session_get_type(), NU=
\r
364 > > params.cryptoctx =3D g_mime_gpg_context_new (session, "gpg");
\r
366 > > if (params.cryptoctx) {
\r
367 > > g_mime_gpg_context_set_always_trust ((GMimeGpgContext*) params.cr=
\r
369 > > params.decrypt =3D TRUE;
\r
371 > > fprintf (stderr, "Failed to construct gpg context.\n");
\r
373 > > +#ifndef GMIME_26
\r
374 > > g_object_unref (session);
\r
378 > > config =3D notmuch_config_open (ctx, NULL, NULL);
\r
379 > > diff --git a/notmuch-show.c b/notmuch-show.c
\r
380 > > index d14dac9..263ab72 100644
\r
381 > > --- a/notmuch-show.c
\r
382 > > +++ b/notmuch-show.c
\r
383 > > @@ -76,7 +76,11 @@ static void
\r
384 > > format_part_encstatus_json (int status);
\r
387 > > +#ifdef GMIME_26
\r
388 > > +format_part_sigstatus_json (GMimeSignatureList* siglist);
\r
390 > > format_part_sigstatus_json (const GMimeSignatureValidity* validity);
\r
394 > > format_part_content_json (GMimeObject *part);
\r
395 > > @@ -486,6 +490,21 @@ show_text_part_content (GMimeObject *part, GMimeSt=
\r
397 > > g_object_unref(stream_filter);
\r
400 > > +#ifdef GMIME_26
\r
401 > > +static const char*
\r
402 > > +signature_status_to_string (GMimeSignatureStatus x)
\r
405 > > + case GMIME_SIGNATURE_STATUS_GOOD:
\r
406 > > + return "good";
\r
407 > > + case GMIME_SIGNATURE_STATUS_BAD:
\r
408 > > + return "bad";
\r
409 > > + case GMIME_SIGNATURE_STATUS_ERROR:
\r
410 > > + return "error";
\r
412 > > + return "unknown";
\r
415 > > static const char*
\r
416 > > signer_status_to_string (GMimeSignerStatus x)
\r
418 > > @@ -501,6 +520,7 @@ signer_status_to_string (GMimeSignerStatus x)
\r
420 > > return "unknown";
\r
425 > > format_part_start_text (GMimeObject *part, int *part_count)
\r
426 > > @@ -592,6 +612,75 @@ format_part_encstatus_json (int status)
\r
430 > > +#ifdef GMIME_26
\r
432 > > +format_part_sigstatus_json (GMimeSignatureList *siglist)
\r
434 > > + printf (", \"sigstatus\": [");
\r
436 > > + if (!siglist) {
\r
437 > > + printf ("]");
\r
441 > > + void *ctx_quote =3D talloc_new (NULL);
\r
443 > > + for (i =3D 0; i < g_mime_signature_list_length (siglist); ++i) {
\r
445 > Style nit: notmuch uses i++.
\r
447 > > + GMimeSignature *signature =3D g_mime_signature_list_get_signature (si=
\r
451 > > + printf (", ");
\r
453 > > + printf ("{");
\r
456 > > + GMimeSignatureStatus status =3D g_mime_signature_get_status (signatur=
\r
458 > > + printf ("\"status\": %s",
\r
459 > > + json_quote_str (ctx_quote,
\r
460 > > + signature_status_to_string (status)));
\r
462 > > + GMimeCertificate *certificate =3D g_mime_signature_get_certificate (s=
\r
464 > > + if (status =3D=3D GMIME_SIGNATURE_STATUS_GOOD)
\r
467 > Style nit: break after brace.
\r
469 > (Presumably this is copied from the existing
\r
470 > format_part_sigstatus_json, but since it's technically new code
\r
471 > there's no reason not to fix these up.)
\r
473 > > + if (certificate)
\r
474 > > + printf (", \"fingerprint\": %s", json_quote_str (ctx_quote, g_mime_c=
\r
475 ertificate_get_fingerprint (certificate)));
\r
476 > > + /* these dates are seconds since the epoch; should we
\r
477 > > + * provide a more human-readable format string? */
\r
478 > > + time_t created =3D g_mime_signature_get_created (signature);
\r
479 > > + if (created !=3D -1)
\r
480 > > + printf (", \"created\": %d", (int) created);
\r
481 > > + time_t expires =3D g_mime_signature_get_expires (signature);
\r
482 > > + if (expires > 0)
\r
483 > > + printf (", \"expires\": %d", (int) expires);
\r
485 > Is it intentional that the two above checks are different? I would
\r
486 > think the second should be expires !=3D -1.
\r
488 Yes, it should check for =E2=80=9Cexpires !=3D -1=E2=80=9D. Also, wouldn't =
\r
490 cast do =E2=80=9Cexpires !=3D (time_t) -1=E2=80=9D to avoid compiler warnin=
\r
492 be different from int.)
\r
494 > > + /* output user id only if validity is FULL or ULTIMATE. */
\r
495 > > + /* note that gmime is using the term "trust" here, which
\r
496 > > + * is WRONG. It's actually user id "validity". */
\r
497 > > + if (certificate)
\r
500 > Break after brace.
\r
502 > > + const char *name =3D g_mime_certificate_get_name (certificate);
\r
503 > > + GMimeCertificateTrust trust =3D g_mime_certificate_get_trust (certif=
\r
505 > > + if (name && (trust =3D=3D GMIME_CERTIFICATE_TRUST_FULLY || trust =3D=
\r
506 =3D GMIME_CERTIFICATE_TRUST_ULTIMATE))
\r
507 > > + printf (", \"userid\": %s", json_quote_str (ctx_quote, name));
\r
509 > > + } else if (certificate) {
\r
510 > > + const char *key_id =3D g_mime_certificate_get_key_id (certificate=
\r
513 > > + printf (", \"keyid\": %s", json_quote_str (ctx_quote, key_id));
\r
516 > > + GMimeSignatureError errors =3D g_mime_signature_get_errors (signature=
\r
518 > > + if (errors !=3D GMIME_SIGNATURE_ERROR_NONE) {
\r
519 > > + printf (", \"errors\": %x", errors);
\r
521 > This should be %d (I would say 0x%x, but JSON doesn't support hex
\r
522 > literals). I see this bug came from the original
\r
523 > format_part_sigstatus_json. Maybe there should be a quick patch
\r
524 > before this one that fixes the source of the bug?
\r
528 > > + printf ("}");
\r
531 > > + printf ("]");
\r
533 > > + talloc_free (ctx_quote);
\r
537 > > format_part_sigstatus_json (const GMimeSignatureValidity* validity)
\r
539 > > @@ -652,6 +741,7 @@ format_part_sigstatus_json (const GMimeSignatureVal=
\r
542 > > talloc_free (ctx_quote);
\r
547 > > format_part_content_json (GMimeObject *part)
\r
548 > > @@ -990,13 +1080,20 @@ notmuch_show_command (void *ctx, unused (int arg=
\r
549 c), unused (char *argv[]))
\r
550 > > } else if ((STRNCMP_LITERAL (argv[i], "--verify") =3D=3D 0) ||
\r
551 > > (STRNCMP_LITERAL (argv[i], "--decrypt") =3D=3D 0)) {
\r
552 > > if (params.cryptoctx =3D=3D NULL) {
\r
553 > > +#ifdef GMIME_26
\r
554 > > + /* TODO: GMimePasswordRequestFunc */
\r
555 > > + if (NULL =3D=3D (params.cryptoctx =3D g_mime_gpg_context_new(NULL, "=
\r
558 > > GMimeSession* session =3D g_object_new(g_mime_session_get_type(), NU=
\r
560 > > if (NULL =3D=3D (params.cryptoctx =3D g_mime_gpg_context_new(session=
\r
563 > > fprintf (stderr, "Failed to construct gpg context.\n");
\r
565 > > g_mime_gpg_context_set_always_trust((GMimeGpgContext*)params.cry=
\r
567 > > +#ifndef GMIME_26
\r
568 > > g_object_unref (session);
\r
569 > > session =3D NULL;
\r
572 > > if (STRNCMP_LITERAL (argv[i], "--decrypt") =3D=3D 0)
\r
573 > > params.decrypt =3D 1;
\r
574 > > diff --git a/show-message.c b/show-message.c
\r
575 > > index 8768889..65269fd 100644
\r
576 > > --- a/show-message.c
\r
577 > > +++ b/show-message.c
\r
578 > > @@ -48,7 +48,11 @@ show_message_part (mime_node_t *node,
\r
579 > > format->part_encstatus (node->decrypt_success);
\r
581 > > if (node->verify_attempted && format->part_sigstatus)
\r
582 > > +#ifdef GMIME_26
\r
583 > > + format->part_sigstatus (node->sig_list);
\r
585 > > format->part_sigstatus (node->sig_validity);
\r
588 > > format->part_content (part);
\r
592 Adrian Perez <aperez@igalia.com> - Sent from my toaster
\r
593 Igalia - Free Software Engineering
\r
596 Content-Type: application/pgp-signature
\r
598 -----BEGIN PGP SIGNATURE-----
\r
599 Version: GnuPG v1.4.11 (GNU/Linux)
\r
601 iEYEARECAAYFAk8VUe4ACgkQkcVZ2+TJEjtcwgCaAjJvz03iNmXNkcc/g76IsYcB
\r
602 fNoAn0SWJIRc+5XxE/xkXo7Cxfno3crv
\r
604 -----END PGP SIGNATURE-----
\r