all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Dehennin <daniel.dehennin@baby-gnu.org>
To: ding@gnus.org
Cc: 7797@debbugs.gnu.org, Ashish SHUKLA <wahjava.ml@gmail.com>,
	Daiki Ueno <ueno@unixuser.org>,
	rfrancoise@debian.org, Luca Capello <luca@pca.it>
Subject: bug#7797: Configure the use of from header for epg signing.
Date: Sun, 16 Jan 2011 21:52:03 +0100	[thread overview]
Message-ID: <87aaj0wozw.fsf__14156.5766105943$1295211287$gmane$org@hati.baby-gnu.org> (raw)
In-Reply-To: <874o9lehkl.fsf@gismo.pca.it>

[-- Attachment #1: Type: text/plain, Size: 1835 bytes --]


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.
---
 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
--- 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")))
 
+(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))
-	 (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))
-	(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))
-- 
1.7.2.3


-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  parent reply	other threads:[~2011-01-16 20:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-06 23:30 bug#7797: 24.0.50; [EasyPG/Gnus] always pick up the first key from `gpg --list-key $SENDER` Luca Capello
2011-01-07  2:04 ` Daiki Ueno
2011-01-07  9:34   ` Daiki Ueno
2011-01-07 10:17     ` Luca Capello
2011-01-07 13:18       ` Daiki Ueno
2011-01-07 17:29       ` bug#7797: Configure the use of from header for epg signing Daniel Dehennin
     [not found]       ` <877heghbc2.fsf@hati.baby-gnu.org>
2011-01-16 20:32         ` Luca Capello
2011-01-16 20:52         ` Daniel Dehennin [this message]
     [not found]         ` <87aaj0wozw.fsf@hati.baby-gnu.org>
2011-01-22 18:51           ` Lars Ingebrigtsen
     [not found]           ` <87sjwku5zp.fsf@gnus.org>
2011-01-24  3:09             ` Daiki Ueno
     [not found]             ` <m3lj2byp3x.fsf-ueno@unixuser.org>
2011-01-27 17:18               ` Julien Danjou
     [not found]               ` <sa3bp32464t.fsf@cigue.easter-eggs.fr>
2011-01-28  1:08                 ` Daiki Ueno
     [not found]                 ` <m362t9dedj.fsf-ueno@unixuser.org>
2011-02-09 12:03                   ` Luca Capello

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='87aaj0wozw.fsf__14156.5766105943$1295211287$gmane$org@hati.baby-gnu.org' \
    --to=daniel.dehennin@baby-gnu.org \
    --cc=7797@debbugs.gnu.org \
    --cc=ding@gnus.org \
    --cc=luca@pca.it \
    --cc=rfrancoise@debian.org \
    --cc=ueno@unixuser.org \
    --cc=wahjava.ml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.