;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; Created: 1995/12/7
;; Renamed: 1997/2/27 from tm-pgp.el
-;; Version: $Id: mime-pgp.el,v 0.17 1997-03-27 20:59:00 morioka Exp $
+;; Version: $Id: mime-pgp.el,v 0.18 1997-03-27 21:17:25 morioka Exp $
;; Keywords: PGP, security, MIME, multimedia, mail, news
;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
))))
(defun mime-article/check-pgp-signature (beg end cal)
+ "Internal method to check PGP/MIME signature."
(let* ((encoding (cdr (assq 'encoding cal)))
(cnum (mime-article/point-content-number beg))
(rcnum (reverse cnum))
(onum (if (> knum 0)
(1- knum)
(1+ knum)))
+ (raw-buf (current-buffer))
(oinfo (mime-article/rcnum-to-cinfo (cons onum rmcnum)
mime::article/content-info))
- str kbuf
+ kbuf
(basename (expand-file-name "tm" mime-temp-directory))
(orig-file (make-temp-name basename))
(sig-file (concat orig-file ".sig"))
)
(save-excursion
- (setq str (buffer-substring
- (mime::content-info/point-min oinfo)
- (mime::content-info/point-max oinfo)
- ))
- (set-buffer (get-buffer-create mime/temp-buffer-name))
- (insert str)
+ (let ((p-min (mime::content-info/point-min oinfo))
+ (p-max (mime::content-info/point-max oinfo))
+ )
+ (set-buffer (get-buffer-create mime/temp-buffer-name))
+ (insert-buffer-substring raw-buf p-min p-max)
+ )
(goto-char (point-min))
(while (re-search-forward "\n" nil t)
(replace-match "\r\n")
(as-binary-output-file (write-file orig-file))
(kill-buffer (current-buffer))
)
+ (save-excursion (mime-show-echo-buffer))
(save-excursion
- (mime-show-echo-buffer)
- (setq str (buffer-substring
- (save-excursion
- (goto-char beg)
- (and (search-forward "\n\n")
- (match-end 0)))
- end))
- (set-buffer (setq kbuf (get-buffer-create mime/temp-buffer-name)))
- (insert str)
+ (let ((p-min (save-excursion
+ (goto-char beg)
+ (and (search-forward "\n\n")
+ (match-end 0))
+ )))
+ (set-buffer (setq kbuf (get-buffer-create mime/temp-buffer-name)))
+ (insert-buffer-substring raw-buf p-min end)
+ )
(mime-decode-region (point-min)(point-max) encoding)
(as-binary-output-file (write-file sig-file))
(or (mime::article/call-pgp-to-check-signature