From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/75702 Path: news.gmane.org!not-for-mail From: Luca Capello Newsgroups: gmane.emacs.bugs,gmane.emacs.gnus.general Subject: bug#7797: Configure the use of from header for epg signing. Date: Sun, 16 Jan 2011 21:32:20 +0100 Message-ID: <87lj2kd1yj.fsf@gismo.pca.it> References: <87y66wn972.fsf@broken.deisui.org> <874o9lehkl.fsf@gismo.pca.it> <87r5cpow4q.fsf@gismo.pca.it> <877heghbc2.fsf@hati.baby-gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: dough.gmane.org 1295211313 16428 80.91.229.12 (16 Jan 2011 20:55:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 16 Jan 2011 20:55:13 +0000 (UTC) Cc: 7797@debbugs.gnu.org, Ashish SHUKLA , Daiki Ueno , rfrancoise@debian.org, ding@gnus.org To: Daniel Dehennin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 16 21:55:08 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PeZcx-0000e8-SU for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Jan 2011 21:55:08 +0100 Original-Received: from localhost ([127.0.0.1]:49855 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PeZcw-0007RD-Un for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Jan 2011 15:55:07 -0500 Original-Received: from [140.186.70.92] (port=60527 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PeZcY-0007HV-FG for bug-gnu-emacs@gnu.org; Sun, 16 Jan 2011 15:54:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PeZcW-00053u-PX for bug-gnu-emacs@gnu.org; Sun, 16 Jan 2011 15:54:42 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PeZcW-00053p-J3 for bug-gnu-emacs@gnu.org; Sun, 16 Jan 2011 15:54:40 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PeZ9q-0001Ey-Hm; Sun, 16 Jan 2011 15:25:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <874o9lehkl.fsf@gismo.pca.it> Resent-From: Luca Capello Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Sun, 16 Jan 2011 20:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7797 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: Original-Received: via spool by 7797-submit@debbugs.gnu.org id=B7797.12952094874745 (code B ref 7797); Sun, 16 Jan 2011 20:25:02 +0000 Original-Received: (at 7797) by debbugs.gnu.org; 16 Jan 2011 20:24:47 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PeZ9b-0001EU-Ck for submit@debbugs.gnu.org; Sun, 16 Jan 2011 15:24:47 -0500 Original-Received: from [151.1.160.141] (helo=clio.genesi.eu) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PeZ9Y-0001EH-Uj for 7797@debbugs.gnu.org; Sun, 16 Jan 2011 15:24:46 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by clio.genesi.eu (Postfix) with ESMTP id 85E8CE0707; Sun, 16 Jan 2011 21:32:25 +0100 (CET) X-Virus-Scanned: amavisd-new at genesi.eu Original-Received: from clio.genesi.eu ([127.0.0.1]) by localhost (clio.genesi.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F7YM8+wo52AA; Sun, 16 Jan 2011 21:32:25 +0100 (CET) Original-Received: from mantissa.pca.it (ip-85-135.sn2.eutelia.it [83.211.85.135]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by clio.genesi.eu (Postfix) with ESMTPS id 3C6C5A740F; Sun, 16 Jan 2011 21:32:25 +0100 (CET) Original-Received: from gismo.pca.it (116-107.78-83.cust.bluewin.ch [83.78.107.116]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mantissa.pca.it (Postfix) with ESMTPSA id 6B6D522296; Sun, 16 Jan 2011 21:32:24 +0100 (CET) Original-Received: by gismo.pca.it (Postfix, from userid 1000) id 6011E2BFE6; Sun, 16 Jan 2011 21:32:23 +0100 (CET) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 16 Jan 2011 15:25:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:43406 gmane.emacs.gnus.general:75702 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi there! On Fri, 07 Jan 2011 14:18:41 +0100, Daiki Ueno wrote: > Luca Capello writes: >> Please, can you post it here, so I do not have to download the bzr >> repository? The Savannah bzr repository is disabled >> and the Launhpad one >> does not >> have it yet. > > Looks git mirror is up to date: > > http://git.sv.gnu.org/cgit/emacs.git/commit/?id=3D3d51f602 It was not at the time of my writing and looking around on the Internet I was not sure if the Git repository is automatically updated (and when) or not. >> I am sorry, but I still think this is not the correct solution, thus I >> reopened the bug (control server bcc:ed). I think the cases should be >> the following, which I have (sort of) explained in my first post and it >> is similar to Ashish's one at: >> >> > > I think there are 2 separate issues: > > (1) Gnus now picks signing keys from "From:" header by default. Which is > an incompatible behavior change from the previous versions. > > (2) mml2015-epg-find-usable-key, a function used to determine whether a > key is usable for signing, has a bug. > > I fixed (2) as r102771 and you are talking about (1).=20=20 Exactly, but I do not understand the need for (2), since as I wrote in my previous reply (point 1) IMHO by default EasyPG should do nothing WRT GnuPG and which keys should be used, especially given that the error message is useless without a non-nil `epg-debug': Message-ID: <87r5cpow4q.fsf@gismo.pca.it> URL: Nevertheless, now that things went back to normality (read below), I do not care such a lot about that. >> I would have wanted to reply only after having implemented my solution, >> but since I am quite busy right now (and I will be for the whole next >> week as well), it is better to put here my ideas *now*. > > Well, probably you could first try the patch for (2) and then propose > improvement ideas for (1) I think :-) FWIW, your patch for (2) works perfectly (adapted to the lisp/gnus/mml2015.el local copy I have), tested on both my working environment and the fresh setup I used to report the bug. On Fri, 07 Jan 2011 18:29:01 +0100, Daniel Dehennin wrote: > Here is a patch to make the use of from header conditional, this solve > issue 1 in [1]. > > It can be fetched from my Gnus git repository [2]. > > I do not update the Changelog to avoid conflict, I think changelog can > be automatically handled by hook when Lars pull in its branch ;-) > > This patch is tested by me. And tested by me as well, *without* Daiki's patch applied, for both signing... =3D=3D=3D=3D=3D /usr/bin/gpg --no-tty --status-fd 1 --yes --command-fd 0 --armor --textmode= \ =2D-output /tmp/epg-output3395dRp --detach-sign -u 8D3867D89DDB992B gpg: skipped "8D3867D89DDB992B": unusable secret key gpg: signing failed: unusable secret key [patch applied] /usr/bin/gpg --no-tty --status-fd 1 --yes --command-fd 0 --armor --textmode= \ =2D-output /tmp/epg-output3395qbv --detach-sign [GNUPG:] USERID_HINT D91D57A03BE9F36D Luca Capello =3D=3D=3D=3D=3D ...and encryption to my Debian address: =3D=3D=3D=3D=3D /usr/bin/gpg --no-tty --status-fd 1 --yes --command-fd 0 --armor --textmode= \ --output /tmp/epg-output355543E --always-trust --encrypt --sign -u 8D3867D= 89DDB992B -r 06EAA066E397832F gpg: skipped "8D3867D89DDB992B": unusable secret key gpg: [stdin]: sign+encrypt failed: unusable secret key [patch applied] /usr/bin/gpg --no-tty --status-fd 1 --yes --command-fd 0 --armor --textmode= \ --output /tmp/epg-output3555FCL --always-trust --encrypt --sign -r 06EAA06= 6E397832F [GNUPG:] USERID_HINT D91D57A03BE9F36D Luca Capello =3D=3D=3D=3D=3D > @@ -1035,7 +1042,8 @@ If no one is selected, default secret key is used. = " > (let ((inhibit-redisplay t) > (context (epg-make-context)) > (config (epg-configuration)) > - (sender (message-options-get 'message-sender)) > + (sender (if mml2015-use-from-address > + (message-options-get 'message-sender))) There are extra spaces before the parenthesis here ;-) Thx, bye, Gismo / Luca --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCgAGBQJNM1XUAAoJENkdV6A76fNt2esP+wZ1TFgIww2fo1cY1R/RV91j hKDNg5W6yUyqVT+bY+3KAfb3REgtdgkBGaEQ2HHKqGLHO1N0O3zTclHJEOH9Qvjq TdT9/rU7/YIaa4YYmnvUKWx5FFkp5cA9MuUIgLntPPhwkNbeiereunXVDm9DcuLy s/pz7CYF7Mo4fM6ufHS8ScBKccRHyUvOAF3+P05gqDJq1iYp90g9A+ZVYaE+ToBw v61flo2+TB4fiYyNVENOnsQuMJlvFGa31dhlflhHFhG7NXlBznk9d6XekWD9g4CC dA5smC+38fene9jdvGqgl8PYUPpHzdXDzPCe8GvhT6VG4WgzVAFYzbkaPtDXgqPk yNck88pFRrRi4MgPuB/tywVGU2xSECenbcJjkRzbdZ9t3l2NlfuWRXt7EkcY9IEb eIJS/YmxW8PA3u3phqy/07wliBQRleW4U/Win5hj7/BVj1c6QqLPcxw6ZlWdxVc8 81J4HxKlRV6i1r6T69VcToDTIeLohENRg9T48Vv78HJpiY1cNqpAuTogD8/I5t+l A6VotcF9LHKECOKQR7tiTp6c9Kp05gZhMrGEn/2tAwdwy4YK8dBAMZrVkQhcbFBV OZlsxfrpB6xyWBYBad0lagFmeWUU0So2BRZ9eUeMSsqfQh973kn6PRLd2lFFcEHc L9uSf2XDX6G1Cq/MwQ1+ =qaSm -----END PGP SIGNATURE----- --=-=-=--