Re: notmuch and "mute" -- useful to anyone?
[notmuch-archives.git] / 24 / 0a0a99ed18ae9ff3953a309966686585c8ca93
1 Return-Path: <dan.bryant@jhuapl.edu>\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 17C3D431FBF\r
6         for <notmuch@notmuchmail.org>; Mon,  9 Jul 2012 11:33:26 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] 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 mKsxC2Drg-xr for <notmuch@notmuchmail.org>;\r
16         Mon,  9 Jul 2012 11:33:24 -0700 (PDT)\r
17 Received: from jhuapl.edu (piper.jhuapl.edu [128.244.251.37])\r
18         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id E7CB1431FAE\r
21         for <notmuch@notmuchmail.org>; Mon,  9 Jul 2012 11:33:23 -0700 (PDT)\r
22 Received: from ([128.244.198.90])\r
23         by piper.jhuapl.edu with ESMTP with TLS id 5Y8HCH1.139907146;\r
24         Mon, 09 Jul 2012 14:33:18 -0400\r
25 Received: from aplesrepublic.dom1.jhuapl.edu ([128.244.198.191]) by\r
26         aplexcas1.dom1.jhuapl.edu ([128.244.198.90]) with mapi; Mon, 9 Jul 2012\r
27         14:33:17 -0400\r
28 From: "Bryant, Daniel B." <Dan.Bryant@jhuapl.edu>\r
29 To: 'Jameson Graef Rollins' <jrollins@finestructure.net>, Notmuch Mail\r
30         <notmuch@notmuchmail.org>\r
31 Date: Mon, 9 Jul 2012 14:33:17 -0400\r
32 Subject: RE: S/MIME support\r
33 Thread-Topic: S/MIME support\r
34 Thread-Index: Ac1WJpG3cF0T/3SwRbaWe/RvL0uQfAH1xQaQ\r
35 Message-ID:\r
36  <24CAA033F4DBCD4DB53CBFB11AEF037C1044F0566F@aplesrepublic.dom1.jhuapl.edu>\r
37 References: <1340995101-9616-1-git-send-email-jrollins@finestructure.net>\r
38 In-Reply-To: <1340995101-9616-1-git-send-email-jrollins@finestructure.net>\r
39 Accept-Language: en-US\r
40 Content-Language: en-US\r
41 X-MS-Has-Attach: \r
42 X-MS-TNEF-Correlator: \r
43 acceptlanguage: en-US\r
44 Content-Type: text/plain; charset="us-ascii"\r
45 Content-Transfer-Encoding: quoted-printable\r
46 MIME-Version: 1.0\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Mon, 09 Jul 2012 18:33:26 -0000\r
60 \r
61 Jamie,\r
62 \r
63 I was able to get signature verification working with your patchset (with a=\r
64  caveat) but not decryption.\r
65 \r
66 Signature Verification\r
67 ----------------------\r
68 \r
69 The caveat is that GMime is still borked with handling signatures with cont=\r
70 ent type application/x-pkcs7-signature (vs. application/pkcs7-signature, wh=\r
71 ich works fine). This is upstream GNOME bug #674032 that was supposed to ha=\r
72 ve been fixed in GMime 2.6.9, but that original fix is also broken.\r
73 \r
74 One possible workaround is to twiddle the content-type of the signature par=\r
75 t (and the corresponding protocol in the multipart/signed part). I implemen=\r
76 ted this by looping over each message part in mime_node_open() and modifyin=\r
77 g as necessary using the following logic:\r
78 \r
79 \r
80     GMimeContentType *content_type =3D g_mime_object_get_content_type (part=\r
81 );\r
82 \r
83     const char *subtype =3D g_mime_content_type_get_media_subtype (content_=\r
84 type);\r
85     const char *protocol =3D g_mime_content_type_get_parameter (content_typ=\r
86 e, "protocol");\r
87 \r
88     if (!strcmp(subtype, "x-pkcs7-signature")) {\r
89         g_mime_content_type_set_media_subtype (content_type, "pkcs7-signatu=\r
90 re");\r
91     }\r
92 \r
93     if (protocol && !strcmp(protocol, "application/x-pkcs7-signature")) {\r
94         g_mime_content_type_set_parameter (content_type, "protocol","applic=\r
95 ation/pkcs7-signature");\r
96     }   =20\r
97 \r
98 \r
99 Decryption\r
100 ----------\r
101 \r
102 All of my S/MIME encrypted mail consists of single part messages with conte=\r
103 nt-type "application/x-pkcs7-mime". These conform to RFC3851, section 3.3/3=\r
104 .4. (sample messages are included in the RFC as well). This fails to be dec=\r
105 rypted by notmuch because the mime node traversal code assumes that every e=\r
106 ncrypted message is multipart/encrypted, which appears to only be true for =\r
107 PGP/MIME.\r
108 \r
109 \r
110 Dan\r
111 \r
112 \r
113 \r
114 -----Original Message-----\r
115 From: notmuch-bounces@notmuchmail.org [mailto:notmuch-bounces@notmuchmail.o=\r
116 rg] On Behalf Of Jameson Graef Rollins\r
117 Sent: Friday, June 29, 2012 2:38 PM\r
118 To: Notmuch Mail\r
119 Subject: S/MIME support\r
120 \r
121 Hey, folks.  This patch adds S/MIME support to notmuch-show.  It's\r
122 pretty simple, now that the crypto rework [0] is complete.\r
123 \r
124 I was going to wait to submit this patch until we had a test suite\r
125 (ehem, dkg!), but seeing as there has been some other interest\r
126 expressed in seeing this feature I'm going to go ahead and send it to\r
127 the list in the hopes that it might spur development of the needed\r
128 tests.\r
129 \r
130 jamie.\r
131 \r
132 [0] id:"1338057946-29209-2-git-send-email-jrollins@finestructure.net"\r
133 \r
134 _______________________________________________\r
135 notmuch mailing list\r
136 notmuch@notmuchmail.org\r
137 http://notmuchmail.org/mailman/listinfo/notmuch\r