[gnus git] branch master updated: m0-5-248-g0abd8b0 =1= Add mml-smime-encrypt-to-self.
Daiki Ueno <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 0abd8b04f1c3e1cbe29de65bd6f2b8eac9204ab9 (commit)
from 397063f971cfc49dc36c54fde6998bdb4e2cc9ef (commit)
- Log -----------------------------------------------------------------
commit 0abd8b04f1c3e1cbe29de65bd6f2b8eac9204ab9
Author: Uwe Brauer <[email protected]>
Date: Thu Jan 10 18:00:56 2013 +0900
Add mml-smime-encrypt-to-self.
* mml-smime.el (mml-smime-encrypt-to-self): New user option analogous
to mml2015-encrypt-to-self.
(mml-smime-epg-encrypt): Respect mml-smime-encrypt-to-self.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cd8ea7c..2ed5647 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2013-01-10 Uwe Brauer <[email protected]> (tiny change)
+
+ * mml-smime.el (mml-smime-encrypt-to-self): New user option analogous
+ to mml2015-encrypt-to-self.
+ (mml-smime-epg-encrypt): Respect mml-smime-encrypt-to-self.
+
2013-01-09 Daiki Ueno <[email protected]>
* mml-smime.el (epg-sub-key-fingerprint): Autoload for
diff --git a/lisp/mml-smime.el b/lisp/mml-smime.el
index e5e99de..6ea5537 100644
--- a/lisp/mml-smime.el
+++ b/lisp/mml-smime.el
@@ -80,6 +80,12 @@ Whether the passphrase is cached at all is controlled by
:version "24.4"
:type 'boolean)
+(defcustom mml-smime-encrypt-to-self nil
+ "If t, add your own key ID to recipient list when encryption."
+ :group 'mime-security
+ :version "24.4"
+ :type 'boolean)
+
(defun mml-smime-sign (cont)
(let ((func (nth 1 (assq mml-smime-use mml-smime-function-alist))))
(if func
@@ -475,11 +481,15 @@ Content-Disposition: attachment; filename=smime.p7s
(goto-char (point-max))))
(defun mml-smime-epg-encrypt (cont)
- (let ((inhibit-redisplay t)
+ (let* ((inhibit-redisplay t)
(context (epg-make-context 'CMS))
(config (epg-configuration))
(recipients (message-options-get 'mml-smime-epg-recipients))
cipher signers
+ (sender (message-options-get 'message-sender))
+ (signer-names (or mml-smime-signers
+ (if (and mml-smime-sign-with-sender sender)
+ (list (concat "<" sender ">")))))
(boundary (mml-compute-boundary cont))
recipient-key)
(unless recipients
@@ -494,6 +504,10 @@ Content-Disposition: attachment; filename=smime.p7s
(message-options-set 'message-recipients
(read-string "Recipients: ")))
"[ \f\t\n\r\v,]+"))))
+ (when mml-smime-encrypt-to-self
+ (unless signer-names
+ (error "Neither message sender nor mml-smime-signers are set"))
+ (setq recipients (nconc recipients signer-names)))
(if (eq mm-encrypt-option 'guided)
(setq recipients
(epa-select-keys context "\
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 6 ++++++
lisp/mml-smime.el | 28 +++++++++++++++++++++-------
2 files changed, 27 insertions(+), 7 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project