1 Return-Path: <darren@fernseed.info>
\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 2BD89429E21
\r
6 for <notmuch@notmuchmail.org>; Fri, 25 Nov 2011 12:37:23 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0.1 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1] 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 KVfTYtGBTkMO for <notmuch@notmuchmail.org>;
\r
16 Fri, 25 Nov 2011 12:37:21 -0800 (PST)
\r
17 Received: from silentio.fernseed.info (silentio.fernseed.info [217.169.4.202])
\r
18 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 513DC431FB6
\r
21 for <notmuch@notmuchmail.org>; Fri, 25 Nov 2011 12:37:21 -0800 (PST)
\r
22 Received: from localhost (bookbinder.fernseed.info
\r
23 [IPv6:2001:8b0:ff94:1:224:2cff:fe37:838b])
\r
24 (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
\r
25 (Client did not present a certificate) (Authenticated sender: darren)
\r
26 by silentio.fernseed.info (Postfix) with ESMTPSA id 6812D98;
\r
27 Fri, 25 Nov 2011 20:37:16 +0000 (GMT)
\r
28 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fernseed.info;
\r
29 s=default; t=1322253439;
\r
30 bh=pcrolySvIqSt9MzCMA2dFeSReAhfFU6EZVw9iT2Nnok=;
\r
31 h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
\r
32 MIME-Version:Content-Type;
\r
33 b=Q+mcg76t/xsma4maJeg41VyTt1BWQ/aNVIojvAvGC6JWexrMbuHFwKrj8WyUE7Fn2
\r
34 WJnifWRmEG89uE/HJmnoUnlUHOuxix8ZLQ/p0MT5maw/Hpvv8fa9/ZvuNpeoxdtiJv
\r
35 NLt18hGfIR0gIaC+Ub8Ap3XFk/dSUFbV+S0lh5+g=
\r
36 From: Darren McGuicken <mailing-notmuch@fernseed.info>
\r
37 To: David Bremner <david@tethera.net>,
\r
38 Jameson Graef Rollins <jrollins@finestructure.net>,
\r
39 Dirk Hohndel <hohndel@infradead.org>,
\r
40 Daniel Kahn Gillmor <dkg@fifthhorseman.net>
\r
41 Subject: Re: compile error of current git on F15
\r
42 In-Reply-To: <87ehwwvy94.fsf@rocinante.cs.unb.ca>
\r
43 References: <m3d3j1uz2i.fsf@x201s.gr8dns.org>
\r
44 <8762osjagp.fsf@servo.factory.finestructure.net>
\r
45 <4DE51768.3070409@fifthhorseman.net>
\r
46 <m3ipspbuge.fsf@x201s.gr8dns.org>
\r
47 <87oc2hlcej.fsf@servo.factory.finestructure.net>
\r
48 <87y5v5i49b.fsf@bookbinder.fernseed.info>
\r
49 <87ehwwvy94.fsf@rocinante.cs.unb.ca>
\r
50 User-Agent: Notmuch/0.10 (http://notmuchmail.org) Emacs/23.3.1
\r
51 (i386-redhat-linux-gnu)
\r
52 Date: Fri, 25 Nov 2011 20:37:14 +0000
\r
53 Message-ID: <8762i8hrb9.fsf@bookbinder.fernseed.info>
\r
55 Content-Type: multipart/signed; boundary="==-=-=";
\r
56 micalg=pgp-sha1; protocol="application/pgp-signature"
\r
57 Cc: notmuch <notmuch@notmuchmail.org>, Jeffrey Stedfast <fejj@novell.com>
\r
58 X-BeenThere: notmuch@notmuchmail.org
\r
59 X-Mailman-Version: 2.1.13
\r
61 List-Id: "Use and development of the notmuch mail system."
\r
62 <notmuch.notmuchmail.org>
\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
66 List-Post: <mailto:notmuch@notmuchmail.org>
\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
70 X-List-Received-Date: Fri, 25 Nov 2011 20:37:23 -0000
\r
73 Content-Type: multipart/mixed; boundary="=-=-="
\r
76 Content-Type: text/plain; charset=utf-8
\r
77 Content-Transfer-Encoding: quoted-printable
\r
79 On Fri, 25 Nov 2011 13:43:35 -0500, David Bremner <david@tethera.net> wrote:
\r
80 > Just confirm, all the crypto tests pass with this patch? In that case,
\r
81 > can we have the patch (preferably as generated by git-send-email)? Or
\r
82 > did I miss it somewhere in this thread?
\r
84 I don't believe the patch ever made it to the list, I can't find it in
\r
85 my own archive. From the changelog here:
\r
87 http://koji.fedoraproject.org/koji/buildinfo?buildID=3D269819
\r
89 it looks like Karel Kl=C3=AD=C4=8D of Red Hat created it back in July, I =
\r
91 that's when Fedora moved to the later GMime version.
\r
93 The patch itself looks like it's a straight re-mapping of the 2.4
\r
94 GMimeSignatureValidity to the 2.5+ equivalent along with some
\r
95 deprecation of GMimeSession, so just applying the patch will break
\r
96 compilation for anyone < 2.5.
\r
98 Also, three of the crypto tests relating to signature validation /do/
\r
99 fail, although it looks like that may simply be down to changes in the
\r
100 output format and so just need updated test cases.
\r
102 I've attached the patch as-is to this mail for reference purposes, but
\r
103 based on the above it'll need a bit of tweaking before it's useful to
\r
108 Content-Type: text/x-patch
\r
109 Content-Disposition: attachment; filename=notmuch-0.6.1-gmime.patch
\r
110 Content-Transfer-Encoding: quoted-printable
\r
111 Content-Description: Fedora GMime Patch
\r
113 diff -up notmuch-0.6.1/notmuch-client.h.gmime notmuch-0.6.1/notmuch-client.h
\r
114 =2D-- notmuch-0.6.1/notmuch-client.h.gmime 2011-07-17 16:20:51.000000000 +0=
\r
116 +++ notmuch-0.6.1/notmuch-client.h 2011-07-28 17:24:16.904949635 +0200
\r
117 @@ -68,7 +68,7 @@ typedef struct notmuch_show_format {
\r
118 void (*part_start) (GMimeObject *part,
\r
120 void (*part_encstatus) (int status);
\r
121 =2D void (*part_sigstatus) (const GMimeSignatureValidity* validity);
\r
122 + void (*part_sigstatus) (GMimeSignatureList *siglist);
\r
123 void (*part_content) (GMimeObject *part);
\r
124 void (*part_end) (GMimeObject *part);
\r
125 const char *part_sep;
\r
126 @@ -82,7 +82,7 @@ typedef struct notmuch_show_params {
\r
130 =2D GMimeCipherContext* cryptoctx;
\r
131 + GMimeCryptoContext* cryptoctx;
\r
133 } notmuch_show_params_t;
\r
135 diff -up notmuch-0.6.1/notmuch-reply.c.gmime notmuch-0.6.1/notmuch-reply.c
\r
136 =2D-- notmuch-0.6.1/notmuch-reply.c.gmime 2011-07-17 16:20:51.000000000 +02=
\r
138 +++ notmuch-0.6.1/notmuch-reply.c 2011-07-28 17:24:16.904949635 +0200
\r
139 @@ -610,13 +610,10 @@ notmuch_reply_command (void *ctx, int ar
\r
141 } else if ((STRNCMP_LITERAL (argv[i], "--decrypt") =3D=3D 0)) {
\r
142 if (params.cryptoctx =3D=3D NULL) {
\r
143 =2D GMimeSession* session =3D g_object_new(g_mime_session_get_type(), NULL=
\r
145 =2D if (NULL =3D=3D (params.cryptoctx =3D g_mime_gpg_context_new(session, =
\r
147 + if (NULL =3D=3D (params.cryptoctx =3D g_mime_gpg_context_new(NULL, "gpg"=
\r
149 fprintf (stderr, "Failed to construct gpg context.\n");
\r
151 g_mime_gpg_context_set_always_trust((GMimeGpgContext*)params.cryptoc=
\r
153 =2D g_object_unref (session);
\r
154 =2D session =3D NULL;
\r
157 fprintf (stderr, "Unrecognized option: %s\n", argv[i]);
\r
158 diff -up notmuch-0.6.1/notmuch-show.c.gmime notmuch-0.6.1/notmuch-show.c
\r
159 =2D-- notmuch-0.6.1/notmuch-show.c.gmime 2011-07-17 16:20:51.000000000 +0200
\r
160 +++ notmuch-0.6.1/notmuch-show.c 2011-07-28 17:24:16.905949620 +0200
\r
161 @@ -70,7 +70,7 @@ static void
\r
162 format_part_encstatus_json (int status);
\r
165 =2Dformat_part_sigstatus_json (const GMimeSignatureValidity* validity);
\r
166 +format_part_sigstatus_json (GMimeSignatureList *siglist);
\r
169 format_part_content_json (GMimeObject *part);
\r
170 @@ -420,16 +420,14 @@ show_text_part_content (GMimeObject *par
\r
174 =2Dsigner_status_to_string (GMimeSignerStatus x)
\r
175 +signature_status_to_string (GMimeSignatureStatus x)
\r
178 =2D case GMIME_SIGNER_STATUS_NONE:
\r
180 =2D case GMIME_SIGNER_STATUS_GOOD:
\r
181 + case GMIME_SIGNATURE_STATUS_GOOD:
\r
183 =2D case GMIME_SIGNER_STATUS_BAD:
\r
184 + case GMIME_SIGNATURE_STATUS_BAD:
\r
186 =2D case GMIME_SIGNER_STATUS_ERROR:
\r
187 + case GMIME_SIGNATURE_STATUS_ERROR:
\r
191 @@ -524,59 +522,65 @@ format_part_encstatus_json (int status)
\r
195 =2Dformat_part_sigstatus_json (const GMimeSignatureValidity* validity)
\r
196 +format_part_sigstatus_json (GMimeSignatureList *siglist)
\r
198 printf (", \"sigstatus\": [");
\r
200 =2D if (!validity) {
\r
206 =2D const GMimeSigner *signer =3D g_mime_signature_validity_get_signers =
\r
208 =2D int first =3D 1;
\r
209 void *ctx_quote =3D talloc_new (NULL);
\r
211 + for (i =3D 0; i < g_mime_signature_list_length (siglist); ++i) {
\r
212 + GMimeSignature *signature =3D g_mime_signature_list_get_signature (siglis=
\r
215 =2D while (signer) {
\r
225 + GMimeSignatureStatus status =3D g_mime_signature_get_status (signature);
\r
226 printf ("\"status\": %s",
\r
227 json_quote_str (ctx_quote,
\r
228 =2D signer_status_to_string (signer->status)));
\r
229 + signature_status_to_string (status)));
\r
231 =2D if (signer->status =3D=3D GMIME_SIGNER_STATUS_GOOD)
\r
232 + GMimeCertificate *certificate =3D g_mime_signature_get_certificate (signa=
\r
234 + if (status =3D=3D GMIME_SIGNATURE_STATUS_GOOD)
\r
236 =2D if (signer->fingerprint)
\r
237 =2D printf (", \"fingerprint\": %s", json_quote_str (ctx_quote, signer->fi=
\r
240 + printf (", \"fingerprint\": %s", json_quote_str (ctx_quote, g_mime_certi=
\r
241 ficate_get_fingerprint (certificate)));
\r
242 /* these dates are seconds since the epoch; should we
\r
243 * provide a more human-readable format string? */
\r
244 =2D if (signer->created)
\r
245 =2D printf (", \"created\": %d", (int) signer->created);
\r
246 =2D if (signer->expires)
\r
247 =2D printf (", \"expires\": %d", (int) signer->expires);
\r
248 + time_t created =3D g_mime_signature_get_created (signature);
\r
249 + if (created !=3D -1)
\r
250 + printf (", \"created\": %d", (int) created);
\r
251 + time_t expires =3D g_mime_signature_get_expires (signature);
\r
252 + if (expires !=3D -1)
\r
253 + printf (", \"expires\": %d", (int) expires);
\r
254 /* output user id only if validity is FULL or ULTIMATE. */
\r
255 /* note that gmime is using the term "trust" here, which
\r
256 * is WRONG. It's actually user id "validity". */
\r
257 =2D if ((signer->name) && (signer->trust)) {
\r
258 =2D if ((signer->trust =3D=3D GMIME_SIGNER_TRUST_FULLY) || (signer->trust =
\r
259 =3D=3D GMIME_SIGNER_TRUST_ULTIMATE))
\r
260 =2D printf (", \"userid\": %s", json_quote_str (ctx_quote, signer->nam=
\r
264 + const char *name =3D g_mime_certificate_get_issuer_name (certificate);
\r
265 + GMimeCertificateTrust trust =3D g_mime_certificate_get_trust (certificat=
\r
267 + if (name && (trust =3D=3D GMIME_CERTIFICATE_TRUST_FULLY || trust =3D=3D =
\r
268 GMIME_CERTIFICATE_TRUST_ULTIMATE))
\r
269 + printf (", \"userid\": %s", json_quote_str (ctx_quote, name));
\r
272 =2D if (signer->keyid)
\r
273 =2D printf (", \"keyid\": %s", json_quote_str (ctx_quote, sig=
\r
276 =2D if (signer->errors !=3D GMIME_SIGNER_ERROR_NONE) {
\r
277 =2D printf (", \"errors\": %x", signer->errors);
\r
279 + } else if (certificate) {
\r
280 + const char *key_id =3D g_mime_certificate_get_key_id (certificate);
\r
282 + printf (", \"keyid\": %s", json_quote_str (ctx_quote, key_id));
\r
285 + GMimeSignatureError errors =3D g_mime_signature_get_errors (signature);
\r
286 + if (errors !=3D GMIME_SIGNATURE_ERROR_NONE) {
\r
287 + printf (", \"errors\": %x", errors);
\r
291 =2D signer =3D signer->next;
\r
296 @@ -899,13 +903,10 @@ notmuch_show_command (void *ctx, unused=20
\r
297 } else if ((STRNCMP_LITERAL (argv[i], "--verify") =3D=3D 0) ||
\r
298 (STRNCMP_LITERAL (argv[i], "--decrypt") =3D=3D 0)) {
\r
299 if (params.cryptoctx =3D=3D NULL) {
\r
300 =2D GMimeSession* session =3D g_object_new(g_mime_session_get_type(), NULL=
\r
302 =2D if (NULL =3D=3D (params.cryptoctx =3D g_mime_gpg_context_new(session, =
\r
304 + if (NULL =3D=3D (params.cryptoctx =3D g_mime_gpg_context_new(NULL, "gpg"=
\r
306 fprintf (stderr, "Failed to construct gpg context.\n");
\r
308 g_mime_gpg_context_set_always_trust((GMimeGpgContext*)params.cryptoc=
\r
310 =2D g_object_unref (session);
\r
311 =2D session =3D NULL;
\r
313 if (STRNCMP_LITERAL (argv[i], "--decrypt") =3D=3D 0)
\r
314 params.decrypt =3D 1;
\r
315 diff -up notmuch-0.6.1/show-message.c.gmime notmuch-0.6.1/show-message.c
\r
316 =2D-- notmuch-0.6.1/show-message.c.gmime 2011-07-17 16:20:51.000000000 +0200
\r
317 +++ notmuch-0.6.1/show-message.c 2011-07-28 17:27:12.295304742 +0200
\r
318 @@ -68,15 +68,16 @@ show_message_part (GMimeObject *part,
\r
319 g_mime_multipart_get_count (multipart));
\r
321 GMimeMultipartEncrypted *encrypteddata =3D GMIME_MULTIPART_ENCRYPTED (pa=
\r
323 =2D decryptedpart =3D g_mime_multipart_encrypted_decrypt (encrypteddata, p=
\r
324 arams->cryptoctx, &err);
\r
325 + GMimeDecryptResult *decrypt_result =3D g_mime_decrypt_result_new ();
\r
326 + decryptedpart =3D g_mime_multipart_encrypted_decrypt (encrypteddata, par=
\r
327 ams->cryptoctx, &decrypt_result, &err);
\r
328 if (decryptedpart) {
\r
329 if ((selected || state->in_zone) && format->part_encstatus)
\r
330 format->part_encstatus (1);
\r
331 =2D const GMimeSignatureValidity *sigvalidity =3D g_mime_multipart_enc=
\r
332 rypted_get_signature_validity (encrypteddata);
\r
333 =2D if (!sigvalidity)
\r
334 =2D fprintf (stderr, "Failed to verify signed part: %s\n", (err ? err->me=
\r
335 ssage : "no error explanation given"));
\r
336 + GMimeSignatureList *siglist =3D g_mime_decrypt_result_get_signatures=
\r
339 + fprintf (stderr, "Failed to get signatures: %s\n", (err ? err->message =
\r
340 : "no error explanation given"));
\r
341 if ((selected || state->in_zone) && format->part_sigstatus)
\r
342 =2D format->part_sigstatus (sigvalidity);
\r
343 + format->part_sigstatus (siglist);
\r
345 fprintf (stderr, "Failed to decrypt part: %s\n", (err ? err->message=
\r
346 : "no error explanation given"));
\r
347 if ((selected || state->in_zone) && format->part_encstatus)
\r
348 @@ -92,20 +93,14 @@ show_message_part (GMimeObject *part,
\r
349 "Error: %d part(s) for a multipart/signed message (should be exactly 2=
\r
351 g_mime_multipart_get_count (multipart));
\r
353 =2D /* For some reason the GMimeSignatureValidity returned
\r
354 =2D * here is not a const (inconsistent with that
\r
356 =2D * g_mime_multipart_encrypted_get_signature_validity,
\r
357 =2D * and therefore needs to be properly disposed of.
\r
358 =2D * Hopefully the API will become more consistent. */
\r
359 =2D GMimeSignatureValidity *sigvalidity =3D g_mime_multipart_signed_verify=
\r
360 (GMIME_MULTIPART_SIGNED (part), params->cryptoctx, &err);
\r
361 =2D if (!sigvalidity) {
\r
362 + GMimeSignatureList *siglist =3D g_mime_multipart_signed_verify (GMIME_MU=
\r
363 LTIPART_SIGNED (part), params->cryptoctx, &err);
\r
365 fprintf (stderr, "Failed to verify signed part: %s\n", (err ? err->m=
\r
366 essage : "no error explanation given"));
\r
368 if ((selected || state->in_zone) && format->part_sigstatus)
\r
369 =2D format->part_sigstatus (sigvalidity);
\r
370 =2D if (sigvalidity)
\r
371 =2D g_mime_signature_validity_free (sigvalidity);
\r
372 + format->part_sigstatus (siglist);
\r
374 + g_object_unref (siglist);
\r
382 Content-Type: application/pgp-signature
\r
384 -----BEGIN PGP SIGNATURE-----
\r
385 Version: GnuPG v1.4.11 (GNU/Linux)
\r
387 iEYEARECAAYFAk7P/HsACgkQP1ao/7snsT4jeACfTnClmksLfTAA86htzmrAeUWb
\r
388 JHQAoK69Uqh3KGO7pgGLl+jtglyVTHD6
\r
390 -----END PGP SIGNATURE-----
\r