Subject: Re: 29.1; epa-sign-file pinentry loopback mode does not work with S/MIME

From: Ulrich Mueller <[email-masked]>
Date: Thu, 09 Nov 2023 10:46:08 +0100

Investigating a little further, I see that gpgsm is invoked like this:

   /usr/bin/gpgsm --no-tty --status-fd 1 --yes --output hello.txt.p7m --pinentry-mode loopback --sign -u XXXXXXXXXXXXXXXX -- hello.txt

I believe that the --passphrase-fd option is missing there.

Trying from the command line, the following works:

   $ /usr/bin/gpgsm --no-tty --status-fd 1 --yes --output hello.txt.p7m --pinentry-mode loopback --passphrase-fd 0 --sign -u XXXXXXXXXXXXXXXX -- hello.txt

It expects a passphrase from stdin (without a prompt), and after
entering that, signing will succeed.

Then again, when I hack function epg--start to add "--passphrase-fd" "0"
to args, the error no longer occurs, but now gpgsm hangs (waiting for
input)? Also Emacs doesn't prompt for a passphrase.

So looks like something else is still missing.