GNU bug report logs - #67012
29.1; epa-sign-file pinentry loopback mode does not work with S/MIME

Previous Next

Package: emacs;

Reported by: Ulrich Mueller <ulm <at> gentoo.org>

Date: Thu, 9 Nov 2023 06:58:02 UTC

Severity: normal

Merged with 59178

Found in versions 28.2, 29.1

Full log


View this message in rfc822 format

From: Ulrich Mueller <ulm <at> gentoo.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 67012 <at> debbugs.gnu.org, Michael Albinus <michael.albinus <at> gmx.de>
Subject: bug#67012: 29.1; epa-sign-file pinentry loopback mode does not work with S/MIME
Date: Thu, 16 Nov 2023 10:54:37 +0100
When executing gpg2 from the command line, but with the same arguments
that are passed from Emacs, I see the following output:

   $ /usr/bin/gpg2 --no-tty --status-fd 1 --yes --enable-progress-filter --command-fd 0 --output hello.txt.gpg --pinentry-mode loopback --sign -u XXXXXXXXXXXXXXXX -- hello.txt 2>/dev/null
   [GNUPG:] KEYEXPIRED 1546257620
   [GNUPG:] KEYEXPIRED 1533081541
   [GNUPG:] KEY_CONSIDERED XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 0
   [GNUPG:] PROGRESS hello.txt ? 0 6 B
   [GNUPG:] BEGIN_SIGNING H8
   [GNUPG:] PROGRESS hello.txt ? 6 6 B
   [GNUPG:] USERID_HINT XXXXXXXXXXXXXXXX Ulrich Müller <ulm <at> gentoo.org>
   [GNUPG:] NEED_PASSPHRASE XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 1 0
   [GNUPG:] INQUIRE_MAXLEN 100
   [GNUPG:] GET_HIDDEN passphrase.enter
   ****  <-- passphrase input
   [GNUPG:] GOT_IT
   [GNUPG:] SIG_CREATED S 1 8 00 1700077951 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

IIUC, function epg--process-filter looks for status output from GnuPG
and calls the matching epg--status-* functions. The passphrase is read
in epg--status-GET_HIDDEN.


For gpgsm (same arguments as passed from Emacs, plus --passphrase-fd 0)
output is this:

   $ /usr/bin/gpgsm --no-tty --status-fd 1 --yes --output hello.txt.p7m --pinentry-mode loopback --passphrase-fd 0 --sign -u XXXXXXXXXXXXXXXX -- hello.txt 2>/dev/null
   ****  <-- passphrase input
   [GNUPG:] PROGRESS starting_agent ? 0 0
   [GNUPG:] SIG_CREATED S 1 8 00 20231115T195756 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Note that gpgsm is way less chatty than gpg2. Especially, the passphrase
is expected before the first status message appears, and function
epg--status-GET_HIDDEN is never called. So this would have to be handled
in a different way.




This bug report was last modified 1 year and 260 days ago.

Previous Next


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