From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Dehennin Newsgroups: gmane.emacs.bugs Subject: bug#7797: Configure the use of from header for epg signing. Date: Fri, 07 Jan 2011 18:29:01 +0100 Message-ID: <877heghbc2.fsf__12345.1070081957$1294424713$gmane$org@hati.baby-gnu.org> References: <87y66wn972.fsf@broken.deisui.org> <874o9lehkl.fsf@gismo.pca.it> <87r5cpow4q.fsf@gismo.pca.it> 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 1294424713 28661 80.91.229.12 (7 Jan 2011 18:25:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 7 Jan 2011 18:25:13 +0000 (UTC) Cc: 7797@debbugs.gnu.org, Ashish SHUKLA , Daiki Ueno , rfrancoise@debian.org, Luca Capello To: ding@gnus.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 07 19:25:06 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 1PbGzn-0006Cq-O7 for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Jan 2011 19:25:06 +0100 Original-Received: from localhost ([127.0.0.1]:34113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PbGzl-0000sF-ED for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Jan 2011 13:25:01 -0500 Original-Received: from [140.186.70.92] (port=40699 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PbGyo-0000RD-2Y for bug-gnu-emacs@gnu.org; Fri, 07 Jan 2011 13:24:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PbGym-0000ht-ML for bug-gnu-emacs@gnu.org; Fri, 07 Jan 2011 13:24:01 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PbGym-0000hp-JU for bug-gnu-emacs@gnu.org; Fri, 07 Jan 2011 13:24:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PbGRv-0007kb-9Q; Fri, 07 Jan 2011 12:50:03 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <874o9lehkl.fsf@gismo.pca.it> Resent-From: Daniel Dehennin 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: Fri, 07 Jan 2011 17:50:03 +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.129442257329756 (code B ref 7797); Fri, 07 Jan 2011 17:50:03 +0000 Original-Received: (at 7797) by debbugs.gnu.org; 7 Jan 2011 17:49:33 +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 1PbGRQ-0007js-TQ for submit@debbugs.gnu.org; Fri, 07 Jan 2011 12:49:33 -0500 Original-Received: from zion.baby-gnu.org ([82.233.222.74]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PbG3C-0007Bu-4o for 7797@debbugs.gnu.org; Fri, 07 Jan 2011 12:24:31 -0500 Original-Received: from hati.asgardr.info ([192.168.1.2] helo=hati.baby-gnu.org) by zion.baby-gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1PbGAA-0003iA-EM; Fri, 07 Jan 2011 18:31:42 +0100 User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Organisation: Dark Church of Emacs X-Mailman-Approved-At: Fri, 07 Jan 2011 12:49:31 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 07 Jan 2011 12:50:03 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Fri, 07 Jan 2011 13:24:55 -0500 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:43188 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. Regards. * lisp/mml2015.el (mml2015-use-from-address): New variable for optional from header use. (mml2015-epg-sign): Use it. (mml2015-epg-encrypt): Ditto. =2D-- lisp/mml2015.el | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/mml2015.el b/lisp/mml2015.el index 9831b33..dde8a08 100644 =2D-- a/lisp/mml2015.el +++ b/lisp/mml2015.el @@ -121,6 +121,12 @@ Whether the passphrase is cached at all is controlled = by :group 'mime-security :type '(repeat (string :tag "Key ID"))) =20 +(defcustom mml2015-use-from-address nil + "If t, use from header mail address before mml2015-signers when +signing." + :group 'mime-security + :type 'boolean) + (defcustom mml2015-encrypt-to-self nil "If t, add your own key ID to recipient list when encryption." :group 'mime-security @@ -960,7 +966,8 @@ Whether the passphrase is cached at all is controlled by (let* ((inhibit-redisplay t) (context (epg-make-context)) (boundary (mml-compute-boundary cont)) =2D (sender (message-options-get 'message-sender)) + (sender (if mml2015-use-from-address + (message-options-get 'message-sender))) signer-key (signers (or (message-options-get 'mml2015-epg-signers) @@ -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)) =2D (sender (message-options-get 'message-sender)) + (sender (if mml2015-use-from-address + (message-options-get 'message-sender))) (recipients (message-options-get 'mml2015-epg-recipients)) cipher signers (boundary (mml-compute-boundary cont)) =2D-=20 1.7.2.3 Footnotes:=20 [1] http://lists.gnu.org/archive/html/bug-gnu-emacs/2011-01/msg00207.html [2] http://www.baby-gnu.org/~nebu/archives/gnus/gnus.git/ dad/mml2015-epg-= use-from-to-sign-if-configured =2D-=20 Daniel Dehennin R=C3=A9cup=C3=A9rer ma clef GPG: gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iEYEAREKAAYFAk0nTf4ACgkQb97L6l6P4Ftn6ACdEF6dZVdg+GabLxqW5opxK5rf hp0AniIRzhN09yflMd8kcI6g6Wh+BQwz =3/bh -----END PGP SIGNATURE----- --=-=-=--