--- /dev/null
+Return-Path: <darren@fernseed.info>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 2BD89429E21\r
+ for <notmuch@notmuchmail.org>; Fri, 25 Nov 2011 12:37:23 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.1\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.1 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id KVfTYtGBTkMO for <notmuch@notmuchmail.org>;\r
+ Fri, 25 Nov 2011 12:37:21 -0800 (PST)\r
+Received: from silentio.fernseed.info (silentio.fernseed.info [217.169.4.202])\r
+ (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 513DC431FB6\r
+ for <notmuch@notmuchmail.org>; Fri, 25 Nov 2011 12:37:21 -0800 (PST)\r
+Received: from localhost (bookbinder.fernseed.info\r
+ [IPv6:2001:8b0:ff94:1:224:2cff:fe37:838b])\r
+ (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+ (Client did not present a certificate) (Authenticated sender: darren)\r
+ by silentio.fernseed.info (Postfix) with ESMTPSA id 6812D98;\r
+ Fri, 25 Nov 2011 20:37:16 +0000 (GMT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fernseed.info;\r
+ s=default; t=1322253439;\r
+ bh=pcrolySvIqSt9MzCMA2dFeSReAhfFU6EZVw9iT2Nnok=;\r
+ h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:\r
+ MIME-Version:Content-Type;\r
+ b=Q+mcg76t/xsma4maJeg41VyTt1BWQ/aNVIojvAvGC6JWexrMbuHFwKrj8WyUE7Fn2\r
+ WJnifWRmEG89uE/HJmnoUnlUHOuxix8ZLQ/p0MT5maw/Hpvv8fa9/ZvuNpeoxdtiJv\r
+ NLt18hGfIR0gIaC+Ub8Ap3XFk/dSUFbV+S0lh5+g=\r
+From: Darren McGuicken <mailing-notmuch@fernseed.info>\r
+To: David Bremner <david@tethera.net>,\r
+ Jameson Graef Rollins <jrollins@finestructure.net>,\r
+ Dirk Hohndel <hohndel@infradead.org>,\r
+ Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+Subject: Re: compile error of current git on F15\r
+In-Reply-To: <87ehwwvy94.fsf@rocinante.cs.unb.ca>\r
+References: <m3d3j1uz2i.fsf@x201s.gr8dns.org>\r
+ <8762osjagp.fsf@servo.factory.finestructure.net>\r
+ <4DE51768.3070409@fifthhorseman.net>\r
+ <m3ipspbuge.fsf@x201s.gr8dns.org>\r
+ <87oc2hlcej.fsf@servo.factory.finestructure.net>\r
+ <87y5v5i49b.fsf@bookbinder.fernseed.info>\r
+ <87ehwwvy94.fsf@rocinante.cs.unb.ca>\r
+User-Agent: Notmuch/0.10 (http://notmuchmail.org) Emacs/23.3.1\r
+ (i386-redhat-linux-gnu)\r
+Date: Fri, 25 Nov 2011 20:37:14 +0000\r
+Message-ID: <8762i8hrb9.fsf@bookbinder.fernseed.info>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="==-=-=";\r
+ micalg=pgp-sha1; protocol="application/pgp-signature"\r
+Cc: notmuch <notmuch@notmuchmail.org>, Jeffrey Stedfast <fejj@novell.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 25 Nov 2011 20:37:23 -0000\r
+\r
+--==-=-=\r
+Content-Type: multipart/mixed; boundary="=-=-="\r
+\r
+--=-=-=\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Fri, 25 Nov 2011 13:43:35 -0500, David Bremner <david@tethera.net> wrote:\r
+> Just confirm, all the crypto tests pass with this patch? In that case,\r
+> can we have the patch (preferably as generated by git-send-email)? Or\r
+> did I miss it somewhere in this thread?\r
+\r
+I don't believe the patch ever made it to the list, I can't find it in\r
+my own archive. From the changelog here:\r
+\r
+ http://koji.fedoraproject.org/koji/buildinfo?buildID=3D269819\r
+\r
+ it looks like Karel Kl=C3=AD=C4=8D of Red Hat created it back in July, I =\r
+assume\r
+that's when Fedora moved to the later GMime version.\r
+\r
+The patch itself looks like it's a straight re-mapping of the 2.4\r
+GMimeSignatureValidity to the 2.5+ equivalent along with some\r
+deprecation of GMimeSession, so just applying the patch will break\r
+compilation for anyone < 2.5.\r
+\r
+Also, three of the crypto tests relating to signature validation /do/\r
+fail, although it looks like that may simply be down to changes in the\r
+output format and so just need updated test cases.\r
+\r
+I've attached the patch as-is to this mail for reference purposes, but\r
+based on the above it'll need a bit of tweaking before it's useful to\r
+the wider group.\r
+\r
+\r
+--=-=-=\r
+Content-Type: text/x-patch\r
+Content-Disposition: attachment; filename=notmuch-0.6.1-gmime.patch\r
+Content-Transfer-Encoding: quoted-printable\r
+Content-Description: Fedora GMime Patch\r
+\r
+diff -up notmuch-0.6.1/notmuch-client.h.gmime notmuch-0.6.1/notmuch-client.h\r
+=2D-- notmuch-0.6.1/notmuch-client.h.gmime 2011-07-17 16:20:51.000000000 +0=\r
+200\r
++++ notmuch-0.6.1/notmuch-client.h 2011-07-28 17:24:16.904949635 +0200\r
+@@ -68,7 +68,7 @@ typedef struct notmuch_show_format {\r
+ void (*part_start) (GMimeObject *part,\r
+ int *part_count);\r
+ void (*part_encstatus) (int status);\r
+=2D void (*part_sigstatus) (const GMimeSignatureValidity* validity);\r
++ void (*part_sigstatus) (GMimeSignatureList *siglist);\r
+ void (*part_content) (GMimeObject *part);\r
+ void (*part_end) (GMimeObject *part);\r
+ const char *part_sep;\r
+@@ -82,7 +82,7 @@ typedef struct notmuch_show_params {\r
+ int entire_thread;\r
+ int raw;\r
+ int part;\r
+=2D GMimeCipherContext* cryptoctx;\r
++ GMimeCryptoContext* cryptoctx;\r
+ int decrypt;\r
+ } notmuch_show_params_t;\r
+=20\r
+diff -up notmuch-0.6.1/notmuch-reply.c.gmime notmuch-0.6.1/notmuch-reply.c\r
+=2D-- notmuch-0.6.1/notmuch-reply.c.gmime 2011-07-17 16:20:51.000000000 +02=\r
+00\r
++++ notmuch-0.6.1/notmuch-reply.c 2011-07-28 17:24:16.904949635 +0200\r
+@@ -610,13 +610,10 @@ notmuch_reply_command (void *ctx, int ar\r
+ }\r
+ } else if ((STRNCMP_LITERAL (argv[i], "--decrypt") =3D=3D 0)) {\r
+ if (params.cryptoctx =3D=3D NULL) {\r
+=2D GMimeSession* session =3D g_object_new(g_mime_session_get_type(), NULL=\r
+);\r
+=2D if (NULL =3D=3D (params.cryptoctx =3D g_mime_gpg_context_new(session, =\r
+"gpg")))\r
++ if (NULL =3D=3D (params.cryptoctx =3D g_mime_gpg_context_new(NULL, "gpg"=\r
+)))\r
+ fprintf (stderr, "Failed to construct gpg context.\n");\r
+ else\r
+ g_mime_gpg_context_set_always_trust((GMimeGpgContext*)params.cryptoc=\r
+tx, FALSE);\r
+=2D g_object_unref (session);\r
+=2D session =3D NULL;\r
+ }\r
+ } else {\r
+ fprintf (stderr, "Unrecognized option: %s\n", argv[i]);\r
+diff -up notmuch-0.6.1/notmuch-show.c.gmime notmuch-0.6.1/notmuch-show.c\r
+=2D-- notmuch-0.6.1/notmuch-show.c.gmime 2011-07-17 16:20:51.000000000 +0200\r
++++ notmuch-0.6.1/notmuch-show.c 2011-07-28 17:24:16.905949620 +0200\r
+@@ -70,7 +70,7 @@ static void\r
+ format_part_encstatus_json (int status);\r
+=20\r
+ static void\r
+=2Dformat_part_sigstatus_json (const GMimeSignatureValidity* validity);\r
++format_part_sigstatus_json (GMimeSignatureList *siglist);\r
+=20\r
+ static void\r
+ format_part_content_json (GMimeObject *part);\r
+@@ -420,16 +420,14 @@ show_text_part_content (GMimeObject *par\r
+ }\r
+=20\r
+ static const char*\r
+=2Dsigner_status_to_string (GMimeSignerStatus x)\r
++signature_status_to_string (GMimeSignatureStatus x)\r
+ {\r
+ switch (x) {\r
+=2D case GMIME_SIGNER_STATUS_NONE:\r
+=2D return "none";\r
+=2D case GMIME_SIGNER_STATUS_GOOD:\r
++ case GMIME_SIGNATURE_STATUS_GOOD:\r
+ return "good";\r
+=2D case GMIME_SIGNER_STATUS_BAD:\r
++ case GMIME_SIGNATURE_STATUS_BAD:\r
+ return "bad";\r
+=2D case GMIME_SIGNER_STATUS_ERROR:\r
++ case GMIME_SIGNATURE_STATUS_ERROR:\r
+ return "error";\r
+ }\r
+ return "unknown";\r
+@@ -524,59 +522,65 @@ format_part_encstatus_json (int status)\r
+ }\r
+=20\r
+ static void\r
+=2Dformat_part_sigstatus_json (const GMimeSignatureValidity* validity)\r
++format_part_sigstatus_json (GMimeSignatureList *siglist)\r
+ {\r
+ printf (", \"sigstatus\": [");\r
+=20\r
+=2D if (!validity) {\r
++ if (!siglist) {\r
+ printf ("]");\r
+ return;\r
+ }\r
+=20\r
+=2D const GMimeSigner *signer =3D g_mime_signature_validity_get_signers =\r
+(validity);\r
+=2D int first =3D 1;\r
+ void *ctx_quote =3D talloc_new (NULL);\r
++ int i;\r
++ for (i =3D 0; i < g_mime_signature_list_length (siglist); ++i) {\r
++ GMimeSignature *signature =3D g_mime_signature_list_get_signature (siglis=\r
+t, i);\r
+=20\r
+=2D while (signer) {\r
+=2D if (first)\r
+=2D first =3D 0;\r
+=2D else\r
++ if (i > 0)\r
+ printf (", ");\r
+=2D\r
+ printf ("{");\r
+=20\r
+ /* status */\r
++ GMimeSignatureStatus status =3D g_mime_signature_get_status (signature);\r
+ printf ("\"status\": %s",\r
+ json_quote_str (ctx_quote,\r
+=2D signer_status_to_string (signer->status)));\r
++ signature_status_to_string (status)));\r
+=20\r
+=2D if (signer->status =3D=3D GMIME_SIGNER_STATUS_GOOD)\r
++ GMimeCertificate *certificate =3D g_mime_signature_get_certificate (signa=\r
+ture);\r
++ if (status =3D=3D GMIME_SIGNATURE_STATUS_GOOD)\r
+ {\r
+=2D if (signer->fingerprint)\r
+=2D printf (", \"fingerprint\": %s", json_quote_str (ctx_quote, signer->fi=\r
+ngerprint));\r
++ if (certificate)\r
++ printf (", \"fingerprint\": %s", json_quote_str (ctx_quote, g_mime_certi=\r
+ficate_get_fingerprint (certificate)));\r
+ /* these dates are seconds since the epoch; should we\r
+ * provide a more human-readable format string? */\r
+=2D if (signer->created)\r
+=2D printf (", \"created\": %d", (int) signer->created);\r
+=2D if (signer->expires)\r
+=2D printf (", \"expires\": %d", (int) signer->expires);\r
++ time_t created =3D g_mime_signature_get_created (signature);\r
++ if (created !=3D -1)\r
++ printf (", \"created\": %d", (int) created);\r
++ time_t expires =3D g_mime_signature_get_expires (signature);\r
++ if (expires !=3D -1)\r
++ printf (", \"expires\": %d", (int) expires);\r
+ /* output user id only if validity is FULL or ULTIMATE. */\r
+ /* note that gmime is using the term "trust" here, which\r
+ * is WRONG. It's actually user id "validity". */\r
+=2D if ((signer->name) && (signer->trust)) {\r
+=2D if ((signer->trust =3D=3D GMIME_SIGNER_TRUST_FULLY) || (signer->trust =\r
+=3D=3D GMIME_SIGNER_TRUST_ULTIMATE))\r
+=2D printf (", \"userid\": %s", json_quote_str (ctx_quote, signer->nam=\r
+e));\r
++ if (certificate)\r
++ {\r
++ const char *name =3D g_mime_certificate_get_issuer_name (certificate);\r
++ GMimeCertificateTrust trust =3D g_mime_certificate_get_trust (certificat=\r
+e);\r
++ if (name && (trust =3D=3D GMIME_CERTIFICATE_TRUST_FULLY || trust =3D=3D =\r
+GMIME_CERTIFICATE_TRUST_ULTIMATE))\r
++ printf (", \"userid\": %s", json_quote_str (ctx_quote, name));\r
+ }\r
+=2D } else {\r
+=2D if (signer->keyid)\r
+=2D printf (", \"keyid\": %s", json_quote_str (ctx_quote, sig=\r
+ner->keyid));\r
+=2D }\r
+=2D if (signer->errors !=3D GMIME_SIGNER_ERROR_NONE) {\r
+=2D printf (", \"errors\": %x", signer->errors);\r
+=2D }\r
++ } else if (certificate) {\r
++ const char *key_id =3D g_mime_certificate_get_key_id (certificate);\r
++ if (key_id)\r
++ printf (", \"keyid\": %s", json_quote_str (ctx_quote, key_id));\r
++ }\r
++\r
++ GMimeSignatureError errors =3D g_mime_signature_get_errors (signature);\r
++ if (errors !=3D GMIME_SIGNATURE_ERROR_NONE) {\r
++ printf (", \"errors\": %x", errors);\r
++ }\r
+=20\r
+=2D printf ("}");\r
+=2D signer =3D signer->next;\r
++ printf ("}");\r
+ }\r
+=20\r
+ printf ("]");\r
+@@ -899,13 +903,10 @@ notmuch_show_command (void *ctx, unused=20\r
+ } else if ((STRNCMP_LITERAL (argv[i], "--verify") =3D=3D 0) ||\r
+ (STRNCMP_LITERAL (argv[i], "--decrypt") =3D=3D 0)) {\r
+ if (params.cryptoctx =3D=3D NULL) {\r
+=2D GMimeSession* session =3D g_object_new(g_mime_session_get_type(), NULL=\r
+);\r
+=2D if (NULL =3D=3D (params.cryptoctx =3D g_mime_gpg_context_new(session, =\r
+"gpg")))\r
++ if (NULL =3D=3D (params.cryptoctx =3D g_mime_gpg_context_new(NULL, "gpg"=\r
+)))\r
+ fprintf (stderr, "Failed to construct gpg context.\n");\r
+ else\r
+ g_mime_gpg_context_set_always_trust((GMimeGpgContext*)params.cryptoc=\r
+tx, FALSE);\r
+=2D g_object_unref (session);\r
+=2D session =3D NULL;\r
+ }\r
+ if (STRNCMP_LITERAL (argv[i], "--decrypt") =3D=3D 0)\r
+ params.decrypt =3D 1;\r
+diff -up notmuch-0.6.1/show-message.c.gmime notmuch-0.6.1/show-message.c\r
+=2D-- notmuch-0.6.1/show-message.c.gmime 2011-07-17 16:20:51.000000000 +0200\r
++++ notmuch-0.6.1/show-message.c 2011-07-28 17:27:12.295304742 +0200\r
+@@ -68,15 +68,16 @@ show_message_part (GMimeObject *part,\r
+ g_mime_multipart_get_count (multipart));\r
+ } else {\r
+ GMimeMultipartEncrypted *encrypteddata =3D GMIME_MULTIPART_ENCRYPTED (pa=\r
+rt);\r
+=2D decryptedpart =3D g_mime_multipart_encrypted_decrypt (encrypteddata, p=\r
+arams->cryptoctx, &err);\r
++ GMimeDecryptResult *decrypt_result =3D g_mime_decrypt_result_new ();\r
++ decryptedpart =3D g_mime_multipart_encrypted_decrypt (encrypteddata, par=\r
+ams->cryptoctx, &decrypt_result, &err);\r
+ if (decryptedpart) {\r
+ if ((selected || state->in_zone) && format->part_encstatus)\r
+ format->part_encstatus (1);\r
+=2D const GMimeSignatureValidity *sigvalidity =3D g_mime_multipart_enc=\r
+rypted_get_signature_validity (encrypteddata);\r
+=2D if (!sigvalidity)\r
+=2D fprintf (stderr, "Failed to verify signed part: %s\n", (err ? err->me=\r
+ssage : "no error explanation given"));\r
++ GMimeSignatureList *siglist =3D g_mime_decrypt_result_get_signatures=\r
+ (decrypt_result);\r
++ if (!siglist)\r
++ fprintf (stderr, "Failed to get signatures: %s\n", (err ? err->message =\r
+: "no error explanation given"));\r
+ if ((selected || state->in_zone) && format->part_sigstatus)\r
+=2D format->part_sigstatus (sigvalidity);\r
++ format->part_sigstatus (siglist);\r
+ } else {\r
+ fprintf (stderr, "Failed to decrypt part: %s\n", (err ? err->message=\r
+ : "no error explanation given"));\r
+ if ((selected || state->in_zone) && format->part_encstatus)\r
+@@ -92,20 +93,14 @@ show_message_part (GMimeObject *part,\r
+ "Error: %d part(s) for a multipart/signed message (should be exactly 2=\r
+)\n",\r
+ g_mime_multipart_get_count (multipart));\r
+ } else {\r
+=2D /* For some reason the GMimeSignatureValidity returned\r
+=2D * here is not a const (inconsistent with that\r
+=2D * returned by\r
+=2D * g_mime_multipart_encrypted_get_signature_validity,\r
+=2D * and therefore needs to be properly disposed of.\r
+=2D * Hopefully the API will become more consistent. */\r
+=2D GMimeSignatureValidity *sigvalidity =3D g_mime_multipart_signed_verify=\r
+ (GMIME_MULTIPART_SIGNED (part), params->cryptoctx, &err);\r
+=2D if (!sigvalidity) {\r
++ GMimeSignatureList *siglist =3D g_mime_multipart_signed_verify (GMIME_MU=\r
+LTIPART_SIGNED (part), params->cryptoctx, &err);\r
++ if (!siglist) {\r
+ fprintf (stderr, "Failed to verify signed part: %s\n", (err ? err->m=\r
+essage : "no error explanation given"));\r
+ }\r
+ if ((selected || state->in_zone) && format->part_sigstatus)\r
+=2D format->part_sigstatus (sigvalidity);\r
+=2D if (sigvalidity)\r
+=2D g_mime_signature_validity_free (sigvalidity);\r
++ format->part_sigstatus (siglist);\r
++ if (siglist)\r
++ g_object_unref (siglist);\r
+ }\r
+ }\r
+=20\r
+\r
+--=-=-=--\r
+\r
+--==-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+\r
+iEYEARECAAYFAk7P/HsACgkQP1ao/7snsT4jeACfTnClmksLfTAA86htzmrAeUWb\r
+JHQAoK69Uqh3KGO7pgGLl+jtglyVTHD6\r
+=Gs0G\r
+-----END PGP SIGNATURE-----\r
+--==-=-=--\r