From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/59880 Path: main.gmane.org!not-for-mail From: =?utf-8?Q?Arne_J=C3=B8rgensen?= Newsgroups: gmane.emacs.gnus.general Subject: Re: Patch for smime-stuff Date: Tue, 22 Feb 2005 23:21:09 +0100 Organization: Arne Joergensen -- http://arnested.dk/ Message-ID: <87oeecgrsa.fsf@seamus.arnested.dk> References: <87d5uszhp7.fsf@seamus.arnested.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1109111063 14774 80.91.229.2 (22 Feb 2005 22:24:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 22 Feb 2005 22:24:23 +0000 (UTC) Original-X-From: ding-owner+M8421@lists.math.uh.edu Tue Feb 22 23:24:23 2005 Original-Received: from malifon.math.uh.edu ([129.7.128.13] ident=mail) by ciao.gmane.org with esmtp (Exim 4.43) id 1D3iRP-0008CC-Ek for ding-account@gmane.org; Tue, 22 Feb 2005 23:23:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1D3iPY-0007kR-00; Tue, 22 Feb 2005 16:21:44 -0600 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1D3iPS-0007kM-00 for ding@lists.math.uh.edu; Tue, 22 Feb 2005 16:21:38 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1D3iPK-0008FX-NE for ding@lists.math.uh.edu; Tue, 22 Feb 2005 16:21:30 -0600 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1D3iPJ-0004jW-00 for ; Tue, 22 Feb 2005 23:21:29 +0100 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1D3iLd-0007C8-0T for ding@gnus.org; Tue, 22 Feb 2005 23:17:41 +0100 Original-Received: from 213.237.94.152 ([213.237.94.152]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Feb 2005 23:17:41 +0100 Original-Received: from arne by 213.237.94.152 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Feb 2005 23:17:41 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 98 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 213.237.94.152 X-Face: 5t,7/Y$&<1A_t.$vC2{pWZ{m@3_06;kcm]no{hgEL/}Uz(>XV6cl4}xO\v?-h3%>znNaZtq `~rf,GY1T%r=a.zH`hOb(-]'x)nI088Z&|e;V^h;/TShou User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:m0UIMofUFHYCxY92VSQMD/wYpNY= X-Spam-Score: -4.9 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu X-MailScanner-From: ding-owner+m8421@lists.math.uh.edu X-MailScanner-To: ding-account@gmane.org Xref: main.gmane.org gmane.emacs.gnus.general:59880 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:59880 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Arne Jørgensen writes: > (smime-sign-buffer): Signal an error if `smime-sign-region' fails. > (smime-encrypt-buffer): Signal an error if `smime-encrypt-region' > fails. Since this above changes is actually a security fix they should also be commited to the v5-10 branch I think. A patch for the v5-10 branch is attached. Kind regards, -- Arne Jørgensen --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=smime_v5-10.patch Content-Transfer-Encoding: 8bit Index: lisp/ChangeLog =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v retrieving revision 6.2771.2.115 diff -u -p -r6.2771.2.115 ChangeLog --- lisp/ChangeLog 21 Feb 2005 13:38:17 -0000 6.2771.2.115 +++ lisp/ChangeLog 22 Feb 2005 22:16:09 -0000 @@ -1,3 +1,10 @@ +2005-02-22 Arne J,Ax(Brgensen + + * smime.el (smime-sign-buffer): Signal an error if + `smime-sign-region' fails. + (smime-encrypt-buffer): Signal an error if `smime-encrypt-region' + fails. + 2005-02-21 Reiner Steib * gnus-art.el (gnus-parse-news-url, gnus-button-handle-news): Index: lisp/smime.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/smime.el,v retrieving revision 6.33.2.3 diff -u -p -r6.33.2.3 smime.el --- lisp/smime.el 13 Feb 2005 04:46:05 -0000 6.33.2.3 +++ lisp/smime.el 22 Feb 2005 22:16:10 -0000 @@ -332,16 +332,17 @@ is expected to contain of a PEM encoded KEYFILE should contain a PEM encoded key and certificate." (interactive) (with-current-buffer (or buffer (current-buffer)) - (smime-sign-region - (point-min) (point-max) - (if keyfile - keyfile - (smime-get-key-with-certs-by-email - (completing-read - (concat "Sign using which key? " - (if smime-keys (concat "(default " (caar smime-keys) ") ") - "")) - smime-keys nil nil (car-safe (car-safe smime-keys)))))))) + (unless (smime-sign-region + (point-min) (point-max) + (if keyfile + keyfile + (smime-get-key-with-certs-by-email + (completing-read + (concat "Sign using which key? " + (if smime-keys (concat "(default " (caar smime-keys) ") ") + "")) + smime-keys nil nil (car-safe (car-safe smime-keys)))))) + (error "Signing failed")))) (defun smime-encrypt-buffer (&optional certfiles buffer) "S/MIME encrypt BUFFER for recipients specified in CERTFILES. @@ -350,11 +351,12 @@ a PEM encoded key and certificate. Uses nil." (interactive) (with-current-buffer (or buffer (current-buffer)) - (smime-encrypt-region - (point-min) (point-max) - (or certfiles - (list (read-file-name "Recipient's S/MIME certificate: " - smime-certificate-directory nil)))))) + (unless (smime-encrypt-region + (point-min) (point-max) + (or certfiles + (list (read-file-name "Recipient's S/MIME certificate: " + smime-certificate-directory nil)))) + (error "Encryption failed")))) ;; Verify+decrypt region --=-=-=--