I did some troubleshooting on this issue, because it affects me as well.
The previous comment mentions an upstream bug report, but I haven't been
able to find it, so I'll post this here.
The first time I send a signed message after restarting Thunderbird, I
get prompted twice for my gpg key password. Each subsequent time I send
a signed message within the same Thunderbird session, I am only prompted
once.
I should make it clear that I have my gpg-agent configured with "ignore-
cache-for-signing" enabled. Although upstream states this case is
working as intended, I can suggest a minor code change which would
eliminate the need for the extra password prompt.
As mentioned previously, there are two signing requests to gpg2 during
this first transaction. The first of these ("--clearsign") is signing
the message "Dummy Test" for the sole purpose of detecting which digest
algorithm gpg2 intends to use: it looks for a line such as "Hash:
SHA256" in the output.
One thing I noticed when testing gpg2 on the command line is gpg2
outputs the "Hash: SHA256" line *before* it prompts for the password.
So, the password prompt can be bypassed by adding the argument
"--pinentry-mode cancel" to the gpg2 command line:
$ /usr/bin/gpg2 --charset utf-8 --display-charset utf-8 --use-agent --batch
--no-tty --status-fd 2 -t --clearsign --pinentry-mode cancel -u
0xE19CF36DDF865D8405B1E4100B39535099304B41 <<< 'Dummy Test'
[GNUPG:] BEGIN_SIGNING H8
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Dummy Test
gpg: signing failed: Operation cancelled
[GNUPG:] FAILURE sign 67108963
gpg: [stdin]: clearsign failed: Operation cancelled
Enigmail can then parse the digest algorithm from the output without needing to
bother the user with an extra password prompt.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/246364
Title:
seahorse asks twice for gpg key password
To manage notifications about this bug go to:
https://bugs.launchpad.net/seahorse/+bug/246364/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs