aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/gnus/smime.el
diff options
context:
space:
mode:
authorKatsumi Yamaoka <[email protected]>2010-11-11 23:51:05 +0000
committerKatsumi Yamaoka <[email protected]>2010-11-11 23:51:05 +0000
commitb0feab7d2c1159c8d8937c846e9e0552ad63684a (patch)
tree21b8b51951f7f9ed761cf4115241551e6984fd4d /lisp/gnus/smime.el
parentec54e7a421075e0b973d72dbf0ab099a328dbe8a (diff)
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.el9
1 files changed, 2 insertions, 7 deletions
diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el
index 5363a40c72..0695d5ac82 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)