From: Daniel Dehennin <daniel.dehennin@baby-gnu.org>
To: ding@gnus.org
Cc: Daiki Ueno <ueno@unixuser.org>, Luca Capello <luca@pca.it>,
7797@debbugs.gnu.org, rfrancoise@debian.org,
Ashish SHUKLA <wahjava.ml@gmail.com>,
Subject: Configure the use of from header for epg signing.
Date: Fri, 07 Jan 2011 18:29:01 +0100 [thread overview]
Message-ID: <877heghbc2.fsf@hati.baby-gnu.org> (raw)
In-Reply-To: <87r5cpow4q.fsf@gismo.pca.it>
[-- Attachment #1: Type: text/plain, Size: 2330 bytes --]
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.
---
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
--- 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
Footnotes:
[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
--
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 --]
next parent reply other threads:[~2011-01-07 17:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87y66wn972.fsf@broken.deisui.org>
[not found] ` <874o9lehkl.fsf@gismo.pca.it>
[not found] ` <m3ipy1h3l8.fsf-ueno@unixuser.org>
[not found] ` <m3r5cp3vlo.fsf-ueno@unixuser.org>
[not found] ` <87r5cpow4q.fsf@gismo.pca.it>
2011-01-07 17:29 ` Daniel Dehennin [this message]
2011-01-11 19:06 ` Lars Magne Ingebrigtsen
2011-01-16 20:32 ` bug#7797: " Luca Capello
2011-01-16 20:52 ` Daniel Dehennin
2011-01-22 18:51 ` Lars Ingebrigtsen
2011-01-24 3:09 ` Daiki Ueno
2011-01-27 17:18 ` Julien Danjou
2011-01-28 1:08 ` Daiki Ueno
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=877heghbc2.fsf@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).