From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id iG4cH33m11/fUAAA0tVLHw (envelope-from ) for ; Mon, 14 Dec 2020 22:26:05 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id aD8aG33m11+1ZAAA1q6Kng (envelope-from ) for ; Mon, 14 Dec 2020 22:26:05 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EC615940396 for ; Mon, 14 Dec 2020 22:26:04 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 4612028C2E; Mon, 14 Dec 2020 17:25:57 -0500 (EST) X-Greylist: delayed 310 seconds by postgrey-1.36 at nmbug; Mon, 14 Dec 2020 17:25:54 EST Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.29.23]) by mail.notmuchmail.org (Postfix) with ESMTPS id E058628535 for ; Mon, 14 Dec 2020 17:25:54 -0500 (EST) Received: from [46.244.201.163] (helo=condition-alpha.com) by smtprelay01.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1kowCr-0007Ph-Ey; Mon, 14 Dec 2020 23:20:37 +0100 Message-Id: <901128385554cbd60c2a64387835b2d3@condition-alpha.com> From: Alexander Adolf To: David Bremner , notmuch@notmuchmail.org Subject: Re: emacs: error decrypting s/mime In-Reply-To: <878sb55vcp.fsf@tethera.net> References: <87a6vm1wid.fsf@tethera.net> <87eeky5d1q.fsf@tethera.net> <878sb55vcp.fsf@tethera.net> Date: Mon, 14 Dec 2020 23:20:38 +0100 MIME-Version: 1.0 X-Df-Sender: YWxleGFuZGVyLmFkb2xmQGNvbmRpdGlvbi1hbHBoYS5jb20= Message-ID-Hash: IYD3I3AFURVXCJLMMTUBUBK73OJVLG7T X-Message-ID-Hash: IYD3I3AFURVXCJLMMTUBUBK73OJVLG7T X-MailFrom: alexander.adolf@condition-alpha.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Daniel Kahn Gillmor X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.78 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: EC615940396 X-Spam-Score: -1.78 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0OOq09Bnchmt Hello David, David Bremner writes: > David Bremner writes: > >> >> It's not perfect (the encryption status for S/MIME needs some new UI >> code on the emacs end), but it's better than the status quo, as far as I >> can tell. > > I think this might be a deeper issue. Looking at the structure of > > test/corpora/protected-headers/smime-sign+enc.eml > > it looks like there is an application/pkcs-7 part for the outer > container with an encstatus, and one inside that (with the same mime > type) with a sigstatus. So maybe the right thing is to just ignore > missing encstatus? This cures most of the issues for me: (defun notmuch-show-insert-part-application/pkcs7-mime (msg part content-type nth depth button) (let* ((encstatus-plist (car (plist-get part :encstatus))) (encstatus (plist-get encstatus-plist :status))) (notmuch-crypto-insert-encstatus-button encstatus-plist) (if (not (string= encstatus "bad")) (notmuch-show-insert-part-multipart/signed msg (car (plist-get part :content)) content-type nth depth button)))) (defalias notmuch-show-insert-part-application/x-pkcs7-mime notmuch-show-insert-part-application/pkcs7-mime) It shows the contents of the S/MIME message, and could e.g. end up in notmuch-show.el, I think. What is left to be desired (IMHO) are some improvements in the gpgsm integration. User-id and key-id matching is a bit rough sometimes. Not sure though whether that is a notmuch issue even (probably an EPA one)? Cheers, and looking forward to your thoughts, --alexander