diff options
author | Katsumi Yamaoka <yamaoka@jpl.org> | 2010-11-11 23:51:05 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2010-11-11 23:51:05 +0000 |
commit | b0feab7d2c1159c8d8937c846e9e0552ad63684a (patch) | |
tree | 21b8b51951f7f9ed761cf4115241551e6984fd4d /lisp/gnus/smime.el | |
parent | ec54e7a421075e0b973d72dbf0ab099a328dbe8a (diff) | |
download | emacs-b0feab7d2c1159c8d8937c846e9e0552ad63684a.tar.gz |
Make mm-dissect-buffer pass sender's mail address to smime-decrypt-region.
mm-decode.el (mm-dissect-buffer): Pass sender's mail address to smime-decrypt-region using function argument.
mm-decode.el (mm-possibly-verify-or-decrypt, mm-dissect-multipart): Relay it.
mm-view.el (mm-view-pkcs7, mm-view-pkcs7-decrypt): Relay it.
smime.el (smime-decrypt-region): Catch it.
Diffstat (limited to 'lisp/gnus/smime.el')
-rw-r--r-- | lisp/gnus/smime.el | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el index 5363a40c727..0695d5ac82e 100644 --- a/lisp/gnus/smime.el +++ b/lisp/gnus/smime.el @@ -426,11 +426,7 @@ Any details (stdout and stderr) are left in the buffer specified by (insert-buffer-substring smime-details-buffer) nil)) -;; TODO: fix this properly by giving it a prefix. -(if (featurep 'xemacs) - (defvar from)) - -(defun smime-decrypt-region (b e keyfile) +(defun smime-decrypt-region (b e keyfile &optional from) "Decrypt S/MIME message in region between B and E with key in KEYFILE. On success, replaces region with decrypted data and return non-nil. Any details (stderr on success, stdout and stderr on error) are left @@ -454,8 +450,7 @@ in the buffer specified by `smime-details-buffer'." (delete-file tmpfile))) (progn (delete-region b e) - (when (boundp 'from) - ;; `from' is dynamically bound in mm-dissect. + (when from (insert "From: " from "\n")) (insert-buffer-substring buffer) (kill-buffer buffer) |