GNU bug report logs - #26298
26.0.50; Gnus fails to sign mail with PGP

Previous Next

Packages: emacs, gnus;

Reported by: Torsten Bronger <bronger <at> physik.rwth-aachen.de>

Date: Wed, 29 Mar 2017 12:13:01 UTC

Severity: normal

Tags: fixed

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Toon Claes <toon <at> iotcl.com>
Cc: 26298 <at> debbugs.gnu.org, Torsten Bronger <bronger <at> physik.rwth-aachen.de>
Subject: bug#26298: 26.0.50; Gnus fails to sign mail with PGP
Date: Sun, 28 Jan 2018 16:23:02 -0500
Toon Claes <toon <at> iotcl.com> writes:

> On Tue, Aug 15, 2017 at 1:54 AM, Toon Claes <toon <at> iotcl.com> wrote:
>> npostavs <at> 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.




This bug report was last modified 7 years and 5 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.