2000-11-30 Simon Josefsson <sj@extundo.com>
authorSimon Josefsson <jas@extundo.com>
Wed, 29 Nov 2000 22:28:45 +0000 (22:28 +0000)
committerSimon Josefsson <jas@extundo.com>
Wed, 29 Nov 2000 22:28:45 +0000 (22:28 +0000)
        * mm-decode.el (mm-security-from): New variable.
        (mm-possibly-verify-or-decrypt): Use it rather than `from'.

        * mml-smime.el (mml-smime-verify): Use `mm-security-from' rather
        than `from'.

lisp/ChangeLog
lisp/mm-decode.el
lisp/mml-smime.el

index ed6b2a5..8bb8fbc 100644 (file)
@@ -1,3 +1,11 @@
+2000-11-30  Simon Josefsson  <sj@extundo.com>
+
+       * mm-decode.el (mm-security-from): New variable.
+       (mm-possibly-verify-or-decrypt): Use it rather than `from'.
+
+       * mml-smime.el (mml-smime-verify): Use `mm-security-from' rather
+       than `from'.
+
 2000-11-30  Simon Josefsson  <sj@extundo.com>
 
        * mml-smime.el (mml-smime-verify): Verify that certificate mail
index 537e495..c7f3bd4 100644 (file)
@@ -1008,6 +1008,7 @@ If RECURSIVE, search recursively."
     result))
 
 (defvar mm-security-handle nil)
+(defvar mm-security-from nil)
 
 (defsubst mm-set-handle-multipart-parameter (handle parameter value)
   ;; HANDLE could be a CTL.
@@ -1018,10 +1019,11 @@ If RECURSIVE, search recursively."
 (defun mm-possibly-verify-or-decrypt (parts ctl)
   (let ((subtype (cadr (split-string (car ctl) "/")))
        (mm-security-handle ctl) ;; (car CTL) is the type.
-       (from (save-restriction
-               (mail-narrow-to-head)
-               (cadr (funcall gnus-extract-address-components 
-                              (or (mail-fetch-field "from") "")))))
+       (mm-security-from
+        (save-restriction
+          (mail-narrow-to-head)
+          (cadr (funcall gnus-extract-address-components 
+                         (or (mail-fetch-field "from") "")))))
        protocol func functest)
     (cond 
      ((equal subtype "signed")
index 7143239..16eff67 100644 (file)
                   (smime-pkcs7-certificates-region (point-min) (point-max)))
          (with-temp-buffer
            (insert-buffer-substring (mm-handle-multipart-original-buffer ctl))
-           (if (not (member from (and (smime-pkcs7-email-region
-                                       (point-min) (point-max))
-                                      (smime-buffer-as-string-region
-                                       (point-min) (point-max)))))
+           (if (not (member mm-security-from
+                            (and (smime-pkcs7-email-region
+                                  (point-min) (point-max))
+                                 (smime-buffer-as-string-region
+                                  (point-min) (point-max)))))
                (progn
                  (mm-set-handle-multipart-parameter 
                   mm-security-handle 'gnus-info "Sender forged")