bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#26298: 26.0.50; Gnus fails to sign mail with PGP


From: Noam Postavsky
Subject: bug#26298: 26.0.50; Gnus fails to sign mail with PGP
Date: Sun, 28 Jan 2018 16:23:02 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)

Toon Claes <toon@iotcl.com> writes:

> On Tue, Aug 15, 2017 at 1:54 AM, Toon Claes <toon@iotcl.com> wrote:
>> npostavs@users.sourceforge.net writes:
>>
>>> Does the patch at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23619#14
>>> help?
>>
>> Well, actually it does help.
>
> One thing though, with this patch, if I enter the incorrect passphrase,
> it gives me an error:
>
>     Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
>       mml2015-epg-sign((part (sign . "pgpmime") (tag-location . 803) 
> (contents . "<redacted>")))
>       mml2015-sign((part (sign . "pgpmime") (tag-location . 803) (contents . 
> "<redacted>")))

I can't reproduce the original bug, but this I can, although with
mml1991 (not clear to me how this get's chosen).  I think it's just a
matter of making the error a bit clearer, e.g.:

--- i/lisp/gnus/mml1991.el
+++ w/lisp/gnus/mml1991.el
@@ -277,6 +277,8 @@ mml1991-epg-sign
        (mm-decode-content-transfer-encoding cte)))
     (let* ((pair (mml-secure-epg-sign 'OpenPGP 'clear))
           (signature (car pair)))
+      (unless (stringp signature)
+        (error "Signature failed"))
       (delete-region (point-min) (point-max))
       (insert
        (with-temp-buffer
diff --git i/lisp/gnus/mml2015.el w/lisp/gnus/mml2015.el
index b220a96098..6baae80309 100644
--- i/lisp/gnus/mml2015.el
+++ w/lisp/gnus/mml2015.el
@@ -958,6 +958,8 @@ mml2015-epg-sign
     (let* ((pair (mml-secure-epg-sign 'OpenPGP t))
           (signature (car pair))
           (micalg (cdr pair)))
+      (unless (stringp signature)
+        (error "Signature failed"))
       (goto-char (point-min))
       (insert (format "Content-Type: multipart/signed; boundary=\"%s\";\n"
                      boundary))

> When I try again instantly, it does not ask me for the passphrase and
> just pops up the same error. When I wait for, I think, about 10 seconds
> to retry, it asks for a passphrase again.

Hmm, I can't reproduce this one, I guess it's related to gpg version (I
have 2.1.18) and how the caching works.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]