GNU bug report logs - #39058
26.1; epg-sign-string should report an error if no pinentry is available

Previous Next

Package: emacs;

Reported by: Arne Babenhauserheide <arne_bab <at> web.de>

Date: Thu, 9 Jan 2020 21:35:01 UTC

Severity: normal

Tags: moreinfo

Found in version 26.1

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Arne Babenhauserheide <arne_bab <at> web.de>
Cc: 39058 <at> debbugs.gnu.org
Subject: bug#39058: 26.1; epg-sign-string should report an error if no pinentry is available
Date: Sun, 02 Aug 2020 10:49:16 +0200
Arne Babenhauserheide <arne_bab <at> web.de> writes:

> If you run epg-sign-string without having pinentry available, then the
> result is nil and instead of an error, even though the status-code seen
> for the process returned by epg-start-sign is 2 and the content of the
> process-buffer is 
>
> "
> Process epg exited abnormally with code 2
> [GNUPG:] KEY_CONSIDERED XXXXXXXXXXXXXXX… 2
> [GNUPG:] BEGIN_SIGNING H8
> [GNUPG:] FAILURE sign 67108949
> "
>
> And the buffer *epg-error*-270683 contains:
> gpg: Beglaubigung fehlgeschlagen: Kein Pinentry
> gpg: signing failed: Kein Pinentry

When you say "without having pinentry available", do you mean that you
click "cancel" in the pinentry window, or that there's no pinentry
available at all?

> To test:
>
> (setq context (epg-make-context 'OpenPGP))
> (setq epg-test-proc (epg-start-sign context (epg-make-data-from-string
> "foo") t))
> (let ((print-length nil) (print-level nil))
> (print context))
> (epg-context-result-for context 'sign)
> (print (epg-context-result-for context 'error))
> (with-current-buffer (process-buffer epg-test-proc) (buffer-string))
> (print (epg-context-result-for context 'error)
> ;; prints \nnilnil

I'm able to reproduce this when clicking "cancel" in the pinentry
window -- no error is signalled anywhere, which I think it should be.
I'll try to look into that.

> This currently breaks signing emails for me.

I don't quite get why it breaks signing emails...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 209 days ago.

Previous Next


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