From: Daniel Dehennin Date: Tue, 16 Nov 2010 20:11:50 +0000 (+0100) Subject: mml2015-epg-encrypt do not use from header to sign. X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;h=3de8a285bb6de5a80f6ff5138858c57a48d26de8;p=gnus mml2015-epg-encrypt do not use from header to sign. * lisp/mml2015.el (mml2015-epg-encrypt): New variable 'sender' is (message-options-get 'message-sender) and append it to mml2015-signers. If mm-sign-option is not 'guided, mml2015-signers and sender sign the mail. --- diff --git a/lisp/mml2015.el b/lisp/mml2015.el index c0ed6dc4e..5a515fa28 100644 --- a/lisp/mml2015.el +++ b/lisp/mml2015.el @@ -941,6 +941,7 @@ 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)) signer-key (signers (or (message-options-get 'mml2015-epg-signers) @@ -950,8 +951,8 @@ Whether the passphrase is cached at all is controlled by (epa-select-keys context "\ Select keys for signing. If no one is selected, default secret key is used. " - mml2015-signers t) - (if mml2015-signers + (cons sender mml2015-signers) t) + (if (or sender mml2015-signers) (delq nil (mapcar (lambda (signer) @@ -965,7 +966,7 @@ If no one is selected, default secret key is used. " signer))) (error "No secret key for %s" signer)) signer-key) - mml2015-signers))))))) + (cons sender mml2015-signers)))))))) signature micalg) (epg-context-set-armor context t) (epg-context-set-textmode context t)