From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.devel Subject: [PATCH] Fix bug in handling GnuPG's TRUST_MARGINAL status Date: Sun, 25 Jun 2017 20:50:54 +0300 Message-ID: <87tw34dkht.fsf@mithlond.arda> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1498413078 1840 195.159.176.226 (25 Jun 2017 17:51:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Jun 2017 17:51:18 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: Daiki Ueno , Michael Olson To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 25 19:51:14 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPBgm-00008U-H0 for ged-emacs-devel@m.gmane.org; Sun, 25 Jun 2017 19:51:12 +0200 Original-Received: from localhost ([::1]:43355 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPBgr-0000Zq-Na for ged-emacs-devel@m.gmane.org; Sun, 25 Jun 2017 13:51:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPBgf-0000Zj-Tp for emacs-devel@gnu.org; Sun, 25 Jun 2017 13:51:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPBgc-0007ZB-16 for emacs-devel@gnu.org; Sun, 25 Jun 2017 13:51:05 -0400 Original-Received: from mail.kapsi.fi ([217.30.184.167]:33224) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dPBgb-0007Y6-G9; Sun, 25 Jun 2017 13:51:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kapsi.fi; s=20161220; h=Content-Type:MIME-Version:Message-ID:Date:Subject:Cc:To:From; bh=QEBECMAJ33PFU9wuKhlNRseM3+orWR7j0fTcPcbtouA=; b=PSgUO7UJzLkYJbzWQiexrlyknr3CBHywLzLeOLTpvlwNxVAXRylubY0jlGXVTSffd2OdmOMP6PXDtqWLd/tIJsIDrWDXKJ9gQZ2KImoya/b6PhcTxXpB/IfEzyt+9Jyyt0ulL3in7NSyJAnz4Yr3bcKIoYH7YeXkTiRZPjpkJpVrDWG2AXUpNHU9Quw+tWbVwpt2Jz+Ap55aUoZZRz5vW8eqdqP4NTk+Caz/kwqke8YTAIRmRVSSVvy/q+erSIgmX2yCMynZQmpobU4sEX+eN5og04X4id2ydYpF1VuA66W/iEBgzxA8Sxv6odWofszcN4+zHvsCGoSJzpadlUxIiA==; Original-Received: from dsl-roibrasgw1-54fb8f-106.dhcp.inet.fi ([84.251.143.106] helo=mithlond.arda) by mail.kapsi.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dPBgU-0001Hf-Rj; Sun, 25 Jun 2017 20:50:54 +0300 Original-Received: from dtw by mithlond.arda with local (Exim 4.89) (envelope-from ) id 1dPBgU-0002P2-DW; Sun, 25 Jun 2017 20:50:54 +0300 X-SA-Exim-Connect-IP: 84.251.143.106 X-SA-Exim-Mail-From: tlikonen@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.30.184.167 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:215971 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi! There's a minor bug in lisp/epg.el file in handling GnuPG's TRUST_MARGINAL status. The effect is that marginal trust (really: validity) is never stored to epg-signature structure and never show by epg-signature-to-string function (and Gnus). Below is a patch with extended context. (I can commit it myself. But let's hear an "OK" from persons responsible for the code.) From=20ae4668138b49580a86d7fd962866cca1329fec45 Mon Sep 17 00:00:00 2001 From: Teemu Likonen Date: Sun, 25 Jun 2017 20:37:54 +0300 Subject: [PATCH] Fix bug in handling GnuPG's TRUST_MARGINAL status * lisp/epg.el (epg--status-TRUST_MARGINAL): Change symbol `marginal' to `good'. =2D-- lisp/epg.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/epg.el b/lisp/epg.el index 587271b000..1e24b8d116 100644 =2D-- a/lisp/epg.el +++ b/lisp/epg.el @@ -1035,31 +1035,31 @@ epg--status-VALIDSIG (defun epg--status-TRUST_UNDEFINED (context _string) (let ((signature (car (epg-context-result-for context 'verify)))) (if (and signature (eq (epg-signature-status signature) 'good)) (setf (epg-signature-validity signature) 'undefined)))) =20 (defun epg--status-TRUST_NEVER (context _string) (let ((signature (car (epg-context-result-for context 'verify)))) (if (and signature (eq (epg-signature-status signature) 'good)) (setf (epg-signature-validity signature) 'never)))) =20 (defun epg--status-TRUST_MARGINAL (context _string) (let ((signature (car (epg-context-result-for context 'verify)))) (if (and signature =2D (eq (epg-signature-status signature) 'marginal)) + (eq (epg-signature-status signature) 'good)) (setf (epg-signature-validity signature) 'marginal)))) =20 (defun epg--status-TRUST_FULLY (context _string) (let ((signature (car (epg-context-result-for context 'verify)))) (if (and signature (eq (epg-signature-status signature) 'good)) (setf (epg-signature-validity signature) 'full)))) =20 (defun epg--status-TRUST_ULTIMATE (context _string) (let ((signature (car (epg-context-result-for context 'verify)))) (if (and signature (eq (epg-signature-status signature) 'good)) (setf (epg-signature-validity signature) 'ultimate)))) =20 (defun epg--status-NOTATION_NAME (context string) =2D-=20 2.11.0 =2D-=20 /// Teemu Likonen - .-.. // // PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 /// --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEkhZiiC54Bnj5a16Skzo1BB5+rVEFAllP9/4ACgkQkzo1BB5+ rVHIggf+MYy0gVsiD9Q1DiaV6zEuZAsBsowfFWxaWLzsciAIV5/ejVpku/a5FCLE 69eHudxlT8zR/JranoAo/SUEwU0vz5QUowbDV4D9nBiqylXVRdl9B5yV3y7lExju V5+9xx84iLTtbCCAxeanipy9k6cx50nQ/l/OSe3QGWakzfvzwXcTm/g7pc/bECRO 8y/kBw6pjg0y8nxz8dr8G2eMaGwjcH3CzP9U0w5IRSyfC25p51a3/3IMsOYH0q0g G9ODPwYOe0CQoTaFIYVUITWsgWWJqaHmoc2q0TRu0cEbwY7LzPh5ljSOi5/CCpDr V30PcE2SEUwwYGBvWKZ/8/XX+7MAEg== =q3fH -----END PGP SIGNATURE----- --=-=-=--