Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 79 / fb1f3e79bbac27ae201a61f887106bfd647b30
1 Return-Path: <bremner@tesseract.cs.unb.ca>\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 D87D6429E26\r
6         for <notmuch@notmuchmail.org>; Sun, 18 Jan 2015 00:03:44 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 2.438\r
10 X-Spam-Level: **\r
11 X-Spam-Status: No, score=2.438 tagged_above=-999 required=5\r
12         tests=[DNS_FROM_AHBL_RHSBL=2.438] 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 iiSv6PDHxqdn for <notmuch@notmuchmail.org>;\r
16         Sun, 18 Jan 2015 00:03:44 -0800 (PST)\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
18         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 7EB8B431FC7\r
21         for <notmuch@notmuchmail.org>; Sun, 18 Jan 2015 00:03:27 -0800 (PST)\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
23         (envelope-from <bremner@tesseract.cs.unb.ca>)\r
24         id 1YCkpT-0004rF-3q; Sun, 18 Jan 2015 04:03:27 -0400\r
25 Received: (nullmailer pid 18929 invoked by uid 1000); Sun, 18 Jan 2015\r
26         08:02:54 -0000\r
27 From: David Bremner <david@tethera.net>\r
28 To: notmuch@notmuchmail.org\r
29 Subject: [Patch v4 5/5] test: add broken test for SMIME decryption with\r
30         notmuch CLI\r
31 Date: Sun, 18 Jan 2015 09:02:47 +0100\r
32 Message-Id: <1421568167-18683-6-git-send-email-david@tethera.net>\r
33 X-Mailer: git-send-email 2.1.4\r
34 In-Reply-To: <1421568167-18683-1-git-send-email-david@tethera.net>\r
35 References: <1421568167-18683-1-git-send-email-david@tethera.net>\r
36 X-BeenThere: notmuch@notmuchmail.org\r
37 X-Mailman-Version: 2.1.13\r
38 Precedence: list\r
39 List-Id: "Use and development of the notmuch mail system."\r
40         <notmuch.notmuchmail.org>\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
42         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
44 List-Post: <mailto:notmuch@notmuchmail.org>\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
48 X-List-Received-Date: Sun, 18 Jan 2015 08:03:45 -0000\r
49 \r
50 The test JSON here is not correct, but the larger problem is thatit seems like no actual decryption is being done.\r
51 ---\r
52  test/T355-smime.sh | 36 ++++++++++++++++++++++++++++++++++++\r
53  1 file changed, 36 insertions(+)\r
54 \r
55 diff --git a/test/T355-smime.sh b/test/T355-smime.sh\r
56 index caedf5e..95dbf8f 100755\r
57 --- a/test/T355-smime.sh\r
58 +++ b/test/T355-smime.sh\r
59 @@ -99,4 +99,40 @@ Verification successful\r
60  EOF\r
61  test_expect_equal_file OUTPUT EXPECTED\r
62  \r
63 +test_begin_subtest "Decryption and signature verification (notmuch CLI)"\r
64 +test_subtest_known_broken\r
65 +output=$(notmuch show --format=json --decrypt subject:"test encrypted message 001" \\r
66 +    | notmuch_json_show_sanitize \\r
67 +    | sed -e 's|"created": [1234567890]*|"created": 946728000|' \\r
68 +         -e 's|"expires": [1234567890]*|"expires": 424242424|' )\r
69 +expected='[[[{"id": "XXXXX",\r
70 + "match": true,\r
71 + "excluded": false,\r
72 + "filename": "YYYYY",\r
73 + "timestamp": 946728000,\r
74 + "date_relative": "2000-01-01",\r
75 + "tags": ["inbox","signed"],\r
76 + "headers": {"Subject": "test encrypted message 001",\r
77 + "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",\r
78 + "To": "test_suite@notmuchmail.org",\r
79 + "Date": "Sat, 01 Jan 2000 12:00:00 +0000"},\r
80 + "body": [{"id": 1,\r
81 + "sigstatus": [{"status": "good",\r
82 + "fingerprint": "'$FINGERPRINT'",\r
83 + "expires": 424242424,\r
84 + "created": 946728000}],\r
85 + "content-type": "multipart/signed",\r
86 + "content": [{"id": 2,\r
87 + "content-type": "text/plain",\r
88 + "content": "This is a test encrypted message.\n"},\r
89 + {"id": 3,\r
90 +  "content-length": 1930,\r
91 +  "content-transfer-encoding": "base64",\r
92 +  "content-type": "application/x-pkcs7-signature",\r
93 +  "filename": "smime.p7s"}]}]},\r
94 + []]]]'\r
95 +test_expect_equal_json \\r
96 +    "$output" \\r
97 +    "$expected"\r
98 +\r
99  test_done\r
100 -- \r
101 2.1.4\r
102 \r