From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Notmuch Mail <notmuch@notmuchmail.org>
Subject: [PATCH 2/2] emacs: Prefer email address over User ID when showing valid signature
Date: Wed, 26 May 2021 21:44:59 -0400 [thread overview]
Message-ID: <20210527014459.3082888-2-dkg@fifthhorseman.net> (raw)
In-Reply-To: <20210527014459.3082888-1-dkg@fifthhorseman.net>
Most concrete verification steps are likely only taken on the e-mail
address in the first place, and e-mail addresses render more
intelligibly than arbitrary User IDs in the first place.
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
---
emacs/notmuch-crypto.el | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el
index db7cb75d..5c260a7a 100644
--- a/emacs/notmuch-crypto.el
+++ b/emacs/notmuch-crypto.el
@@ -119,14 +119,19 @@ mode."
(cond
((string= status "good")
(let ((fingerprint (concat "0x" (plist-get sigstatus :fingerprint)))
+ (email (plist-get sigstatus :email))
(userid (plist-get sigstatus :userid)))
- ;; If userid is present it has full or greater validity.
- (if userid
+ ;; If email or userid are present, they have full or greater validity.
+ (if email
(progn
- (setq label (concat "Good signature by: " userid))
+ (setq label (concat "Good signature by: " email))
(setq face 'notmuch-crypto-signature-good))
- (setq label (concat "Good signature by key: " fingerprint))
- (setq face 'notmuch-crypto-signature-good-key))
+ (if userid
+ (progn
+ (setq label (concat "Good signature by: " userid))
+ (setq face 'notmuch-crypto-signature-good))
+ (setq label (concat "Good signature by key: " fingerprint))
+ (setq face 'notmuch-crypto-signature-good-key)))
(setq button-action 'notmuch-crypto-sigstatus-good-callback)
(setq help-msg (concat "Click to list key ID 0x" fingerprint "."))))
((string= status "error")
--
2.30.2
next prev parent reply other threads:[~2021-05-27 1:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-26 23:32 difficulty in rendering S/MIME signature status from some certificates Daniel Kahn Gillmor
2021-05-27 1:44 ` [PATCH 1/2] cli/show: produce "email" element in sigstatus Daniel Kahn Gillmor
2021-05-27 1:44 ` Daniel Kahn Gillmor [this message]
2021-06-07 12:07 ` [PATCH 2/2] emacs: Prefer email address over User ID when showing valid signature David Edmondson
2021-06-07 12:24 ` Daniel Kahn Gillmor
2021-06-26 16:41 ` [PATCH] " David Bremner
2021-06-27 15:13 ` Daniel Kahn Gillmor
2021-06-27 17:21 ` David Bremner
2021-06-27 17:21 ` [PATCH 1/2] cli/show: produce "email" element in sigstatus David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210527014459.3082888-2-dkg@fifthhorseman.net \
--to=dkg@fifthhorseman.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).