Re: [PATCH v3 1/6] cli: new crypto structure to store crypto contexts and parameters...
authorJani Nikula <jani@nikula.org>
Wed, 23 May 2012 05:59:59 +0000 (08:59 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:47:16 +0000 (09:47 -0800)
f6/fc9924949dd6f0a26b77f148a2c93edab4a890 [new file with mode: 0644]

diff --git a/f6/fc9924949dd6f0a26b77f148a2c93edab4a890 b/f6/fc9924949dd6f0a26b77f148a2c93edab4a890
new file mode 100644 (file)
index 0000000..2b5cdc4
--- /dev/null
@@ -0,0 +1,421 @@
+Return-Path: <jani@nikula.org>\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 CCAF8431FAF\r
+       for <notmuch@notmuchmail.org>; Tue, 22 May 2012 23:00:03 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.699\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
+       tests=[HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 L8ri6PGhDFiS for <notmuch@notmuchmail.org>;\r
+       Tue, 22 May 2012 23:00:01 -0700 (PDT)\r
+Received: from mail-ob0-f181.google.com (mail-ob0-f181.google.com\r
+       [209.85.214.181]) (using TLSv1 with cipher RC4-MD5 (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 990EB431FBD\r
+       for <notmuch@notmuchmail.org>; Tue, 22 May 2012 23:00:01 -0700 (PDT)\r
+Received: by obbuo19 with SMTP id uo19so12399326obb.26\r
+       for <notmuch@notmuchmail.org>; Tue, 22 May 2012 23:00:00 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=mime-version:in-reply-to:references:date:message-id:subject:from:to\r
+       :cc:content-type:x-gm-message-state;\r
+       bh=oXwxC2xxA729NWM0BOEO0mTxIoVTBDumKLMg9DyVGVs=;\r
+       b=abz+jm3wKi7j72VAbUOKQt+0n2PiywCN478fhMGhCx6A+6D+vSlnf06pAu8ZUYiqn3\r
+       MFJ7PhQsEni5kLL3iorEb/ePRh/3xm4c6JxXMH6w26olsaojuFfu8eKYRFaGHx+df7km\r
+       zfo/F4ZjGqi7gMqYFv3d6To4toRAwEtfLsKN7MZYi8G0M8fsVhxZ79cKS4xZwmMmRXeY\r
+       Xk8UZOq0g205d0ZVOvBwe6KkoszWakiKjca+jF7cvOXAk6g7AhdmhxclVhFqPgKYrHsQ\r
+       dCyJFzIOoS/n9FBAobwknDqeASpmzal5BYuzwEOXzelurNTXyKKO2xoFZgrV88XWtNgn\r
+       FQTQ==\r
+MIME-Version: 1.0\r
+Received: by 10.60.3.40 with SMTP id 8mr644771oez.31.1337752799886; Tue, 22\r
+       May 2012 22:59:59 -0700 (PDT)\r
+Received: by 10.76.173.136 with HTTP; Tue, 22 May 2012 22:59:59 -0700 (PDT)\r
+Received: by 10.76.173.136 with HTTP; Tue, 22 May 2012 22:59:59 -0700 (PDT)\r
+In-Reply-To: <1337737430-21160-2-git-send-email-jrollins@finestructure.net>\r
+References: <1337737430-21160-1-git-send-email-jrollins@finestructure.net>\r
+       <1337737430-21160-2-git-send-email-jrollins@finestructure.net>\r
+Date: Wed, 23 May 2012 08:59:59 +0300\r
+Message-ID:\r
+ <CAB+hUn_eapb9nxC2rnyRX7czoXELX-8KeWOCFe-eDtRw0OifOw@mail.gmail.com>\r
+Subject: Re: [PATCH v3 1/6] cli: new crypto structure to store crypto contexts\r
+       and parameters, and functions to support it\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Jameson Graef Rollins <jrollins@finestructure.net>\r
+Content-Type: multipart/alternative; boundary=e89a8f83a3456f3bdb04c0add800\r
+X-Gm-Message-State:\r
+ ALoCoQmFHnzbqVzpgQ/ZrF8juX6v4MfDcsLCOGMjS/wFXprLNZhMomdyZHyhYy1Czqz/n+stjdlf\r
+Cc: Notmuch Mail <notmuch@notmuchmail.org>\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: Wed, 23 May 2012 06:00:04 -0000\r
+\r
+--e89a8f83a3456f3bdb04c0add800\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On May 23, 2012 4:44 AM, "Jameson Graef Rollins" <jrollins@finestructure.ne=\r
+t>\r
+wrote:\r
+>\r
+> This new structure, notmuch_crypto_t, keeps all relevant crypto\r
+> contexts and parameters together, and will make it easier to pass the\r
+> stuff around and clean it up.  The name of the crypto context inside\r
+> this new struct will change, to reflect that it is actually a GPG\r
+> context, which is a sub type of Crypto context.  There are other types\r
+> of Crypto contexts (Pkcs7 in particular, which we hope to support) so\r
+> we want to be clear.\r
+>\r
+> The new crypto.c contains functions to return the proper context from\r
+> the struct for a given protocol (and initialize it if needed), and to\r
+> cleanup a struct by releasing the crypto contexts.\r
+> ---\r
+>  Makefile.local   |    1 +\r
+>  crypto.c         |   65\r
+++++++++++++++++++++++++++++++++++++++++++++++++++++++\r
+>  notmuch-client.h |   15 +++++++++++++\r
+>  3 files changed, 81 insertions(+)\r
+>  create mode 100644 crypto.c\r
+>\r
+> diff --git a/Makefile.local b/Makefile.local\r
+> index 53b4a0d..a890df2 100644\r
+> --- a/Makefile.local\r
+> +++ b/Makefile.local\r
+> @@ -292,6 +292,7 @@ notmuch_client_srcs =3D               \\r
+>        notmuch-time.c          \\r
+>        query-string.c          \\r
+>        mime-node.c             \\r
+> +       crypto.c                \\r
+>        json.c\r
+>\r
+>  notmuch_client_modules =3D $(notmuch_client_srcs:.c=3D.o)\r
+> diff --git a/crypto.c b/crypto.c\r
+> new file mode 100644\r
+> index 0000000..c346999\r
+> --- /dev/null\r
+> +++ b/crypto.c\r
+> @@ -0,0 +1,65 @@\r
+> +/* notmuch - Not much of an email program, (just index and search)\r
+> + *\r
+> + * Copyright =C2=A9 2012 Jameson Rollins\r
+> + *\r
+> + * This program is free software: you can redistribute it and/or modify\r
+> + * it under the terms of the GNU General Public License as published by\r
+> + * the Free Software Foundation, either version 3 of the License, or\r
+> + * (at your option) any later version.\r
+> + *\r
+> + * This program is distributed in the hope that it will be useful,\r
+> + * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+> + * GNU General Public License for more details.\r
+> + *\r
+> + * You should have received a copy of the GNU General Public License\r
+> + * along with this program.  If not, see http://www.gnu.org/licenses/ .\r
+> + *\r
+> + * Authors: Jameson Rollins <jrollins@finestructure.net>\r
+> + */\r
+> +\r
+> +#include "notmuch-client.h"\r
+> +\r
+> +/* for the specified protocol return the context pointer (initializing\r
+> + * if needed) */\r
+> +GMimeCryptoContext *\r
+> +notmuch_crypto_get_context (notmuch_crypto_t *crypto, const char\r
+*protocol)\r
+> +{\r
+> +    GMimeCryptoContext *cryptoctx =3D NULL;\r
+\r
+Isn't GMimeCryptoContext gmime 2.6 specific? It's #ifdeffed elsewhere at\r
+least. Also affects the return type.\r
+\r
+> +\r
+> +    if ((strcmp (protocol, "application/pgp-signature") =3D=3D 0)\r
+> +       || (strcmp (protocol, "application/pgp-encrypted") =3D=3D 0)) {\r
+\r
+Is protocol guaranteed to be lower case?\r
+\r
+> +       if (!crypto->gpgctx) {\r
+> +#ifdef GMIME_ATLEAST_26\r
+> +           /* TODO: GMimePasswordRequestFunc */\r
+> +           crypto->gpgctx =3D g_mime_gpg_context_new (NULL, "gpg");\r
+> +#else\r
+> +           GMimeSession* session =3D g_object_new\r
+(g_mime_session_get_type(), NULL);\r
+> +           crypto->gpgctx =3D g_mime_gpg_context_new (session, "gpg");\r
+> +           g_object_unref (session);\r
+> +#endif\r
+> +           if (crypto->gpgctx) {\r
+> +               g_mime_gpg_context_set_always_trust ((GMimeGpgContext*)\r
+crypto->gpgctx, FALSE);\r
+> +           } else {\r
+> +               fprintf (stderr, "Failed to construct gpg context.\n");\r
+> +           }\r
+> +       }\r
+> +       cryptoctx =3D crypto->gpgctx;\r
+> +\r
+> +    } else {\r
+> +       fprintf (stderr, "Unknown or unsupported cryptographic\r
+protocol.\n");\r
+> +    }\r
+> +\r
+> +    return cryptoctx;\r
+> +}\r
+> +\r
+> +int\r
+> +notmuch_crypto_cleanup (notmuch_crypto_t *crypto)\r
+> +{\r
+> +    if (crypto->gpgctx) {\r
+> +       g_object_unref(crypto->gpgctx);\r
+> +       crypto->gpgctx =3D NULL;\r
+> +    }\r
+> +\r
+> +    return 0;\r
+> +}\r
+> diff --git a/notmuch-client.h b/notmuch-client.h\r
+> index 19b7f01..14d1e2f 100644\r
+> --- a/notmuch-client.h\r
+> +++ b/notmuch-client.h\r
+> @@ -74,6 +74,15 @@ typedef struct notmuch_show_format {\r
+>     const char *message_set_end;\r
+>  } notmuch_show_format_t;\r
+>\r
+> +typedef struct notmuch_crypto {\r
+> +#ifdef GMIME_ATLEAST_26\r
+> +    GMimeCryptoContext* gpgctx;\r
+> +#else\r
+> +    GMimeCipherContext* gpgctx;\r
+> +#endif\r
+> +    notmuch_bool_t decrypt;\r
+> +} notmuch_crypto_t;\r
+> +\r
+>  typedef struct notmuch_show_params {\r
+>     notmuch_bool_t entire_thread;\r
+>     notmuch_bool_t omit_excluded;\r
+> @@ -113,6 +122,12 @@ chomp_newline (char *str)\r
+>        str[strlen(str)-1] =3D '\0';\r
+>  }\r
+>\r
+> +GMimeCryptoContext *\r
+> +notmuch_crypto_get_context (notmuch_crypto_t *crypto, const char\r
+*protocol);\r
+> +\r
+> +int\r
+> +notmuch_crypto_cleanup (notmuch_crypto_t *crypto);\r
+> +\r
+>  int\r
+>  notmuch_count_command (void *ctx, int argc, char *argv[]);\r
+>\r
+> --\r
+> 1.7.10\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r
+\r
+--e89a8f83a3456f3bdb04c0add800\r
+Content-Type: text/html; charset=UTF-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+<p><br>\r
+On May 23, 2012 4:44 AM, &quot;Jameson Graef Rollins&quot; &lt;<a href=3D"m=\r
+ailto:jrollins@finestructure.net">jrollins@finestructure.net</a>&gt; wrote:=\r
+<br>\r
+&gt;<br>\r
+&gt; This new structure, notmuch_crypto_t, keeps all relevant crypto<br>\r
+&gt; contexts and parameters together, and will make it easier to pass the<=\r
+br>\r
+&gt; stuff around and clean it up. =C2=A0The name of the crypto context ins=\r
+ide<br>\r
+&gt; this new struct will change, to reflect that it is actually a GPG<br>\r
+&gt; context, which is a sub type of Crypto context. =C2=A0There are other =\r
+types<br>\r
+&gt; of Crypto contexts (Pkcs7 in particular, which we hope to support) so<=\r
+br>\r
+&gt; we want to be clear.<br>\r
+&gt;<br>\r
+&gt; The new crypto.c contains functions to return the proper context from<=\r
+br>\r
+&gt; the struct for a given protocol (and initialize it if needed), and to<=\r
+br>\r
+&gt; cleanup a struct by releasing the crypto contexts.<br>\r
+&gt; ---<br>\r
+&gt; =C2=A0Makefile.local =C2=A0 | =C2=A0 =C2=A01 +<br>\r
+&gt; =C2=A0crypto.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 | =C2=A0 65 +++++++++++++++=\r
++++++++++++++++++++++++++++++++++++++++<br>\r
+&gt; =C2=A0notmuch-client.h | =C2=A0 15 +++++++++++++<br>\r
+&gt; =C2=A03 files changed, 81 insertions(+)<br>\r
+&gt; =C2=A0create mode 100644 crypto.c<br>\r
+&gt;<br>\r
+&gt; diff --git a/Makefile.local b/Makefile.local<br>\r
+&gt; index 53b4a0d..a890df2 100644<br>\r
+&gt; --- a/Makefile.local<br>\r
+&gt; +++ b/Makefile.local<br>\r
+&gt; @@ -292,6 +292,7 @@ notmuch_client_srcs =3D =C2=A0 =C2=A0 =C2=A0 =C2=\r
+=A0 =C2=A0 =C2=A0 =C2=A0 \<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0notmuch-time.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =\r
+=C2=A0\<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0query-string.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =\r
+=C2=A0\<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0mime-node.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=\r
+=A0 =C2=A0 \<br>\r
+&gt; + =C2=A0 =C2=A0 =C2=A0 crypto.c =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=\r
+=A0 =C2=A0 =C2=A0\<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0json.c<br>\r
+&gt;<br>\r
+&gt; =C2=A0notmuch_client_modules =3D $(notmuch_client_srcs:.c=3D.o)<br>\r
+&gt; diff --git a/crypto.c b/crypto.c<br>\r
+&gt; new file mode 100644<br>\r
+&gt; index 0000000..c346999<br>\r
+&gt; --- /dev/null<br>\r
+&gt; +++ b/crypto.c<br>\r
+&gt; @@ -0,0 +1,65 @@<br>\r
+&gt; +/* notmuch - Not much of an email program, (just index and search)<br=\r
+>\r
+&gt; + *<br>\r
+&gt; + * Copyright =C2=A9 2012 Jameson Rollins<br>\r
+&gt; + *<br>\r
+&gt; + * This program is free software: you can redistribute it and/or modi=\r
+fy<br>\r
+&gt; + * it under the terms of the GNU General Public License as published =\r
+by<br>\r
+&gt; + * the Free Software Foundation, either version 3 of the License, or<=\r
+br>\r
+&gt; + * (at your option) any later version.<br>\r
+&gt; + *<br>\r
+&gt; + * This program is distributed in the hope that it will be useful,<br=\r
+>\r
+&gt; + * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>\r
+&gt; + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. =C2=A0See the=\r
+<br>\r
+&gt; + * GNU General Public License for more details.<br>\r
+&gt; + *<br>\r
+&gt; + * You should have received a copy of the GNU General Public License<=\r
+br>\r
+&gt; + * along with this program. =C2=A0If not, see <a href=3D"http://www.g=\r
+nu.org/licenses/">http://www.gnu.org/licenses/</a> .<br>\r
+&gt; + *<br>\r
+&gt; + * Authors: Jameson Rollins &lt;<a href=3D"mailto:jrollins@finestruct=\r
+ure.net">jrollins@finestructure.net</a>&gt;<br>\r
+&gt; + */<br>\r
+&gt; +<br>\r
+&gt; +#include &quot;notmuch-client.h&quot;<br>\r
+&gt; +<br>\r
+&gt; +/* for the specified protocol return the context pointer (initializin=\r
+g<br>\r
+&gt; + * if needed) */<br>\r
+&gt; +GMimeCryptoContext *<br>\r
+&gt; +notmuch_crypto_get_context (notmuch_crypto_t *crypto, const char *pro=\r
+tocol)<br>\r
+&gt; +{<br>\r
+&gt; + =C2=A0 =C2=A0GMimeCryptoContext *cryptoctx =3D NULL;</p>\r
+<p>Isn&#39;t GMimeCryptoContext gmime 2.6 specific? It&#39;s #ifdeffed else=\r
+where at least. Also affects the return type.</p>\r
+<p>&gt; +<br>\r
+&gt; + =C2=A0 =C2=A0if ((strcmp (protocol, &quot;application/pgp-signature&=\r
+quot;) =3D=3D 0)<br>\r
+&gt; + =C2=A0 =C2=A0 =C2=A0 || (strcmp (protocol, &quot;application/pgp-enc=\r
+rypted&quot;) =3D=3D 0)) {</p>\r
+<p>Is protocol guaranteed to be lower case?<br></p>\r
+<p>&gt; + =C2=A0 =C2=A0 =C2=A0 if (!crypto-&gt;gpgctx) {<br>\r
+&gt; +#ifdef GMIME_ATLEAST_26<br>\r
+&gt; + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* TODO: GMimePasswordRequestFunc=\r
+ */<br>\r
+&gt; + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 crypto-&gt;gpgctx =3D g_mime_gpg_=\r
+context_new (NULL, &quot;gpg&quot;);<br>\r
+&gt; +#else<br>\r
+&gt; + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 GMimeSession* session =3D g_objec=\r
+t_new (g_mime_session_get_type(), NULL);<br>\r
+&gt; + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 crypto-&gt;gpgctx =3D g_mime_gpg_=\r
+context_new (session, &quot;gpg&quot;);<br>\r
+&gt; + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 g_object_unref (session);<br>\r
+&gt; +#endif<br>\r
+&gt; + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (crypto-&gt;gpgctx) {<br>\r
+&gt; + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 g_mime_gpg_context_=\r
+set_always_trust ((GMimeGpgContext*) crypto-&gt;gpgctx, FALSE);<br>\r
+&gt; + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 } else {<br>\r
+&gt; + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 fprintf (stderr, &q=\r
+uot;Failed to construct gpg context.\n&quot;);<br>\r
+&gt; + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }<br>\r
+&gt; + =C2=A0 =C2=A0 =C2=A0 }<br>\r
+&gt; + =C2=A0 =C2=A0 =C2=A0 cryptoctx =3D crypto-&gt;gpgctx;<br>\r
+&gt; +<br>\r
+&gt; + =C2=A0 =C2=A0} else {<br>\r
+&gt; + =C2=A0 =C2=A0 =C2=A0 fprintf (stderr, &quot;Unknown or unsupported c=\r
+ryptographic protocol.\n&quot;);<br>\r
+&gt; + =C2=A0 =C2=A0}<br>\r
+&gt; +<br>\r
+&gt; + =C2=A0 =C2=A0return cryptoctx;<br>\r
+&gt; +}<br>\r
+&gt; +<br>\r
+&gt; +int<br>\r
+&gt; +notmuch_crypto_cleanup (notmuch_crypto_t *crypto)<br>\r
+&gt; +{<br>\r
+&gt; + =C2=A0 =C2=A0if (crypto-&gt;gpgctx) {<br>\r
+&gt; + =C2=A0 =C2=A0 =C2=A0 g_object_unref(crypto-&gt;gpgctx);<br>\r
+&gt; + =C2=A0 =C2=A0 =C2=A0 crypto-&gt;gpgctx =3D NULL;<br>\r
+&gt; + =C2=A0 =C2=A0}<br>\r
+&gt; +<br>\r
+&gt; + =C2=A0 =C2=A0return 0;<br>\r
+&gt; +}<br>\r
+&gt; diff --git a/notmuch-client.h b/notmuch-client.h<br>\r
+&gt; index 19b7f01..14d1e2f 100644<br>\r
+&gt; --- a/notmuch-client.h<br>\r
+&gt; +++ b/notmuch-client.h<br>\r
+&gt; @@ -74,6 +74,15 @@ typedef struct notmuch_show_format {<br>\r
+&gt; =C2=A0 =C2=A0 const char *message_set_end;<br>\r
+&gt; =C2=A0} notmuch_show_format_t;<br>\r
+&gt;<br>\r
+&gt; +typedef struct notmuch_crypto {<br>\r
+&gt; +#ifdef GMIME_ATLEAST_26<br>\r
+&gt; + =C2=A0 =C2=A0GMimeCryptoContext* gpgctx;<br>\r
+&gt; +#else<br>\r
+&gt; + =C2=A0 =C2=A0GMimeCipherContext* gpgctx;<br>\r
+&gt; +#endif<br>\r
+&gt; + =C2=A0 =C2=A0notmuch_bool_t decrypt;<br>\r
+&gt; +} notmuch_crypto_t;<br>\r
+&gt; +<br>\r
+&gt; =C2=A0typedef struct notmuch_show_params {<br>\r
+&gt; =C2=A0 =C2=A0 notmuch_bool_t entire_thread;<br>\r
+&gt; =C2=A0 =C2=A0 notmuch_bool_t omit_excluded;<br>\r
+&gt; @@ -113,6 +122,12 @@ chomp_newline (char *str)<br>\r
+&gt; =C2=A0 =C2=A0 =C2=A0 =C2=A0str[strlen(str)-1] =3D &#39;\0&#39;;<br>\r
+&gt; =C2=A0}<br>\r
+&gt;<br>\r
+&gt; +GMimeCryptoContext *<br>\r
+&gt; +notmuch_crypto_get_context (notmuch_crypto_t *crypto, const char *pro=\r
+tocol);<br>\r
+&gt; +<br>\r
+&gt; +int<br>\r
+&gt; +notmuch_crypto_cleanup (notmuch_crypto_t *crypto);<br>\r
+&gt; +<br>\r
+&gt; =C2=A0int<br>\r
+&gt; =C2=A0notmuch_count_command (void *ctx, int argc, char *argv[]);<br>\r
+&gt;<br>\r
+&gt; --<br>\r
+&gt; 1.7.10<br>\r
+&gt;<br>\r
+&gt; _______________________________________________<br>\r
+&gt; notmuch mailing list<br>\r
+&gt; <a href=3D"mailto:notmuch@notmuchmail.org">notmuch@notmuchmail.org</a>=\r
+<br>\r
+&gt; <a href=3D"http://notmuchmail.org/mailman/listinfo/notmuch">http://not=\r
+muchmail.org/mailman/listinfo/notmuch</a><br>\r
+</p>\r
+\r
+--e89a8f83a3456f3bdb04c0add800--\r