From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/4847 Path: news.gmane.org!not-for-mail From: Milan Zamazal Newsgroups: gmane.emacs.gnus.user Subject: Verifying pkcs7-mime messages -- patch Date: Wed, 06 Apr 2005 13:37:56 +0200 Organization: BRAILCOM, o.p.s. Message-ID: <87sm2487aj.fsf@blackbird.zamazal.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1138670723 25122 80.91.229.2 (31 Jan 2006 01:25:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 01:25:23 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:34:23 2006 Original-Path: quimby.gnus.org!newsfeed1.e.nsc.no!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-X-Trace: individual.net NknwjUvVUBr1VH03OVuxqAohHVp/45wRRpFaXqtqWoZbZW8Imz X-Face: >kl&pL}(a*u\BCj7Q,\Yoq35~,4dAu"CPGaJ[ahMli9uu#aF7dWxc3L.eaK2RWRU|',E+. -':&gJ-JAZ/N$f^4-3?G7M&Knna[A=lJ$}^!%@vuvulVl6-)x.V8RZ7fW9< User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:7Qx8wDZBSR0hmt1QMcBxpb75AI4= Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:4988 Original-Lines: 61 X-Gnus-Article-Number: 4988 Tue Jan 17 17:34:23 2006 Xref: news.gmane.org gmane.emacs.gnus.user:4847 Archived-At: --=-=-= The following patch against Emacs CVS makes Gnus verify pkcs7-mime signatures: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=mm-view.el.patch --- mm-view.el.orig 2005-04-05 18:05:25.599196219 +0200 +++ mm-view.el 2005-04-05 18:03:59.177559850 +0200 @@ -538,18 +538,24 @@ (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))) + (let ((verified nil)) + (with-temp-buffer + (insert "MIME-Version: 1.0\n") + (mm-insert-headers "application/pkcs7-mime" "base64" "smime.p7m") + (insert-buffer-substring (mm-handle-buffer handle)) + (setq verified (smime-verify-region (point-min) (point-max)))) + (goto-char (point-min)) + (mm-insert-part handle) + (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))) + (unless verified + (insert-buffer-substring smime-details-buffer))) (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) (autoload 'gnus-completing-read-maybe-default "gnus-util" nil nil 'macro) --=-=-= Regards, Milan Zamazal -- If we are going to start removing packages because of the quality of the software, wonderful. I move to remove all traces of the travesty of editors, vi, from Debian, since obviously as editors they are less than alpha quality software. -- Manoj Srivastava in debian-devel --=-=-=--