From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4B/hD7X5rmCwUwAAgWs5BA (envelope-from ) for ; Thu, 27 May 2021 03:45:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6FGrC7X5rmDGaQAAB5/wlQ (envelope-from ) for ; Thu, 27 May 2021 01:45:25 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E0CB615CE3 for ; Thu, 27 May 2021 03:45:23 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 1EDE02B1C0; Wed, 26 May 2021 21:45:11 -0400 (EDT) Received: from che.mayfirst.org (che.mayfirst.org [IPv6:2001:470:1:116::7]) by mail.notmuchmail.org (Postfix) with ESMTPS id A4038271D6 for ; Wed, 26 May 2021 21:45:06 -0400 (EDT) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1622079902; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=34L7uJDhnCcCfDogudeUa2tMKzeSVlZ9IAXpunEplx8=; b=9cdPnTaMz+Q6qnO/eadclsmFviX15hj27MqSo6OJ9Jj/aZDZoe+DOrDTIjcY2j/hNH715 QcwWTQQI30vyY24Bw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1622079902; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=34L7uJDhnCcCfDogudeUa2tMKzeSVlZ9IAXpunEplx8=; b=AgS8AW3Hr6UMRY+dU6Y5bV5FVNXYqEoIV7LTbQBGtB6xXmYK4PSZKQlkxAgBQd2eVJf4j 8Dc30WJyomjhboRLH1uzVrysylp0DN00u/l2lYOcE/LDLX74jEp84rWh+iqsz3323cVXNFp 3tco+/1AJTCifLtO531wp93kQpdBDGcI0GwPGE+fhSvl2f/ut6rJ8EzD+SCW3l+RgtAkJgM cItUcYzkKWMEhC2IUky43rSU3tULA4IMpa3vmr86S/fe31qNL6M2sp3+2xMHc1SB05/0qYc JQ4yVIU0P6bLNTbu1O3BtlSRmeiAObcOIrPmdl8/Q9wKQcDj9fLNMzSJZFlA== Received: from fifthhorseman.net (lair.fifthhorseman.net [108.58.6.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id B6709F9A7 for ; Wed, 26 May 2021 21:45:02 -0400 (EDT) Received: by fifthhorseman.net (Postfix, from userid 1000) id 56AD32030E; Wed, 26 May 2021 21:44:59 -0400 (EDT) From: Daniel Kahn Gillmor To: Notmuch Mail Subject: [PATCH 2/2] emacs: Prefer email address over User ID when showing valid signature Date: Wed, 26 May 2021 21:44:59 -0400 Message-Id: <20210527014459.3082888-2-dkg@fifthhorseman.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210527014459.3082888-1-dkg@fifthhorseman.net> References: <878s41ax6t.fsf@fifthhorseman.net> <20210527014459.3082888-1-dkg@fifthhorseman.net> MIME-Version: 1.0 Message-ID-Hash: RL5JMZSSG6ILCHYY7VWKH2WMR7ML6BLM X-Message-ID-Hash: RL5JMZSSG6ILCHYY7VWKH2WMR7ML6BLM X-MailFrom: dkg@fifthhorseman.net 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 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622079925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=UdCrbxchISFmzSsGhWcSV4DCQGfQ3huAGgxFgZsZLl4=; b=Xh3Zii/bYbhUYMTNbkdvmCEq7RwJCYHHqRxarZF6PZcOUwF27RBhzv9ND5s1wUU3pa3dam 38Ssmlg7embaKFHE8Zr4cEjwLoiDpEOhmuiEMelIQR67IT4CETJNF9BcVjqzksiJYCfaQx ECU9sY2o5oGsxkimr4hDETwK8mAgrg0u0g8+O0iLiNanFFpWgQHBz1NbnBNQnp1jD1AS/c MB/Mu2IQb9XKIEaJWqIIAR0R7ZEWcjEZGLiiGOnVjLhbZrgrX1bTeFTZjyuTpsHEQQPOaS qcAtOmj1OS5Ai7HLeRLznRaq1Gp8qtMa/m0y9MjvSaQfZk91bmXB3FIJ77lk6Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622079925; a=rsa-sha256; cv=none; b=R0JNua8T2tX3cRj+UZ6KOatXr66hhiiYMetMGLxvu04270XWrH90GMGaKL5Fvgqd+ZfOK7 xd13CpAjvg4sTPl30HZxhKup7Kd4zkPN0N0yOddVAG7xKgz2XO4IfGSaAMP4GBoQhKv3XW db9TET710BtC5mT/Hsm89xlIMDg+buhsN7byDdnqI6Na9bWd7Yju0roSf1p3+qM8rnp/5a EOiZ/o93YCZOR8XoOekjGLBk80RklILQABp6fPdvNbPyrUcwXm2sOiJJPd4zYSPsU9yIIC Y9G4hiVQQP64zGMZRgEZHXu69Mm8VPd1NJWEDF3U8zMT9fSNngIqvJhb8a+lhA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=fifthhorseman.net header.s=2019 header.b=9cdPnTaM; dkim=fail ("body hash did not verify") header.d=fifthhorseman.net header.s=2019rsa header.b=AgS8AW3H; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fifthhorseman.net (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 1.67 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=fifthhorseman.net header.s=2019 header.b=9cdPnTaM; dkim=fail ("body hash did not verify") header.d=fifthhorseman.net header.s=2019rsa header.b=AgS8AW3H; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fifthhorseman.net (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: E0CB615CE3 X-Spam-Score: 1.67 X-Migadu-Scanner: scn1.migadu.com X-TUID: w10w0zkOfsqZ 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 --- 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