+2002-03-01 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * mm-view.el (mm-view-pkcs7-verify): New function. A bogus
+ implementation of PKCS#7, which just allows users read the
+ message.
+ (mm-view-pkcs7): Use it.
+
2002-02-27 ShengHuo ZHU <zsh@cs.rochester.edu>
* gnus.el (large-newsgroup-initial): New parameter.
(defun mm-view-pkcs7 (handle)
(case (mm-view-pkcs7-get-type handle)
(enveloped (mm-view-pkcs7-decrypt handle))
+ (signed (mm-view-pkcs7-verify handle))
(otherwise (error "Unknown or unimplemented PKCS#7 type"))))
+(defun mm-view-pkcs7-verify (handle)
+ ;; A bogus implementation of PKCS#7. FIXME::
+ (mm-insert-part handle)
+ (goto-char (point-min))
+ (if (search-forward "Content-Type: " nil t)
+ (delete-region (point-min) (match-beginning 0)))
+ (goto-char (point-max))
+ (if (re-search-backward "--\r?\n?" nil t)
+ (delete-region (match-end 0) (point-max)))
+ (goto-char (point-min))
+ (while (search-forward "\r\n" nil t)
+ (replace-match "\n"))
+ (message "Verify signed PKCS#7 message is unimplemented.")
+ (sit-for 1)
+ t)
+
(defun mm-view-pkcs7-decrypt (handle)
(insert-buffer (mm-handle-buffer handle))
(goto-char (point-min))