From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/75701 Path: news.gmane.org!not-for-mail From: Daniel Dehennin Newsgroups: gmane.emacs.gnus.general Subject: Re: Configure the use of from header for epg signing. Date: Sun, 16 Jan 2011 21:52:03 +0100 Message-ID: <87aaj0wozw.fsf@hati.baby-gnu.org> References: <87lj2kd1yj.fsf@gismo.pca.it> <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 1295211234 16079 80.91.229.12 (16 Jan 2011 20:53:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 16 Jan 2011 20:53:54 +0000 (UTC) Cc: Luca Capello , Daiki Ueno , 7797@debbugs.gnu.org, rfrancoise@debian.org, Ashish SHUKLA To: ding@gnus.org Original-X-From: ding-owner+M24052@lists.math.uh.edu Sun Jan 16 21:53:49 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PeZbe-0008KC-Mq for ding-account@gmane.org; Sun, 16 Jan 2011 21:53:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PeZaQ-0000N2-7J; Sun, 16 Jan 2011 14:52:30 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PeZaO-0000Mr-Ci for ding@lists.math.uh.edu; Sun, 16 Jan 2011 14:52:28 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PeZaM-0003mc-Rs for ding@lists.math.uh.edu; Sun, 16 Jan 2011 14:52:28 -0600 Original-Received: from zion.baby-gnu.org ([82.233.222.74]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1PeZaL-0001Ou-MF for ding@gnus.org; Sun, 16 Jan 2011 21:52:25 +0100 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 1PeZa0-0004SW-7I; Sun, 16 Jan 2011 21:52:04 +0100 Organisation: Dark Church of Emacs User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:75701 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Here is a fixed patch. 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..762eb95 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 =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) iEYEAREKAAYFAk0zWnMACgkQb97L6l6P4FuLWACggJK7hMAnTSKhzYdxhB4ykpsD FSoAnRDfYwzslXmMqVy04ZgMv2NTF3aq =5pew -----END PGP SIGNATURE----- --=-=-=--