--- /dev/null
+Return-Path: <david@tethera.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 11C5D6DE0C81\r
+ for <notmuch@notmuchmail.org>; Mon, 14 Dec 2015 12:03:22 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.31\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.31 tagged_above=-999 required=5 tests=[AWL=0.241, \r
+ RP_MATCHES_RCVD=-0.55, SPF_PASS=-0.001] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id jPBRSKWmeWnL for <notmuch@notmuchmail.org>;\r
+ Mon, 14 Dec 2015 12:03:20 -0800 (PST)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 1B1856DE0231\r
+ for <notmuch@notmuchmail.org>; Mon, 14 Dec 2015 12:03:20 -0800 (PST)\r
+Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
+ (envelope-from <david@tethera.net>)\r
+ id 1a8ZKz-0004in-Kt; Mon, 14 Dec 2015 15:03:13 -0500\r
+Received: (nullmailer pid 24936 invoked by uid 1000);\r
+ Mon, 14 Dec 2015 20:03:14 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: Re: [Patch v3 4/8] test: initial tests for S/MIME and notmuch-emacs\r
+In-Reply-To: <1450100337-31655-5-git-send-email-david@tethera.net>\r
+References: <1450100337-31655-1-git-send-email-david@tethera.net>\r
+ <1450100337-31655-5-git-send-email-david@tethera.net>\r
+User-Agent: Notmuch/0.21+5~gca076ce (http://notmuchmail.org) Emacs/24.4.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Mon, 14 Dec 2015 16:03:14 -0400\r
+Message-ID: <87h9jkajct.fsf@tesseract.cs.unb.ca>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 14 Dec 2015 20:03:22 -0000\r
+\r
+David Bremner <david@tethera.net> writes:\r
+\r
+> Test the ability of notmuch-mua-mail to send S/MIME signed (and\r
+> encrypted) messages; this really relies on existing functionality in\r
+> message-mode.\r
+>\r
+> The generated keys and messages will later be useful for testing the\r
+> notmuch CLI.\r
+> ---\r
+> test/T355-smime.sh | 42 +++++++++++++++++++++++++++++++++++++\r
+> test/smime/README | 7 +++++++\r
+> test/smime/key+cert.pem | 56 +++++++++++++++++++++++++++++++++++++++++++++++++\r
+> test/smime/test.crt | 19 +++++++++++++++++\r
+> test/test-lib.el | 10 +++++++++\r
+> test/test-lib.sh | 1 +\r
+> 6 files changed, 135 insertions(+)\r
+> create mode 100755 test/T355-smime.sh\r
+> create mode 100644 test/smime/README\r
+> create mode 100644 test/smime/key+cert.pem\r
+> create mode 100644 test/smime/test.crt\r
+>\r
+> diff --git a/test/T355-smime.sh b/test/T355-smime.sh\r
+> new file mode 100755\r
+> index 0000000..e3419d6\r
+> --- /dev/null\r
+> +++ b/test/T355-smime.sh\r
+> @@ -0,0 +1,42 @@\r
+> +#!/usr/bin/env bash\r
+> +\r
+> +test_description='S/MIME signature verification and decryption'\r
+> +. ./test-lib.sh\r
+\r
+Apparently this needs\r
+\r
+unset GPG_AGENT_INFO\r
+\r
+at the beginning to avoid getting confused by a potential pre-2.1\r
+gpg-agent.\r
+\r