[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wl fails to display message
Hi,
> yesterday I received a message from the pkgsrc-users mailing list that
> I cannot read in wl. The below error is displayed:
(snip)
> Any ideas what's wrong here?
Content-Type: header of the message does not have protocol parameter,
which is mandatory. Please override verify functions with the below
codes.
(defun mime-verify-application/*-signature-internal (entity situation)
(let* ((mother (mime-entity-parent entity))
(orig-entity (car (mime-entity-children mother)))
(protocol (cdr (assoc "protocol" (mime-entity-parameters mother))))
context)
(setq context
(and protocol
(epg-make-context
(if (equal protocol "application/pgp-signature")
'OpenPGP
(if (string-match
"\\`application/\\(x-\\)?pkcs7-signature\\'" protocol)
'CMS)))))
(if context
(progn
(epg-verify-string context
(mime-entity-content entity)
(with-temp-buffer
(if (fboundp 'set-buffer-multibyte)
(set-buffer-multibyte nil))
(mime-insert-entity orig-entity)
(goto-char (point-min))
(while (search-forward "\n" nil t)
(replace-match "\r\n"))
(buffer-substring (point-min) (point-max))))
(epg-context-result-for context 'verify))
(if protocol
(format "Unknown protocol: %s." protocol)
"No protocol is specified."))))
(defun mime-verify-application/*-signature (entity situation)
(let ((verify-result
(mime-verify-application/*-signature-internal entity situation)))
(cond
((stringp verify-result)
(mime-show-echo-buffer verify-result))
((> (length verify-result) 1)
(mime-show-echo-buffer (epg-verify-result-to-string verify-result)))
(verify-result
(epa-display-info verify-result)))))
(defun mime-preview-application/*-signature (entity situation)
(let ((verify-result
(mime-verify-application/*-signature-internal entity situation))
string)
(if (stringp verify-result)
(insert verify-result)
(setq string (epg-verify-result-to-string verify-result))
(when (> (length string) 0)
(unless (string-equal (substring string -1) "\n")
(setq string (concat string "\n")))
(insert string)))))
--
Kazuhiro Ito