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 Desktop
Packages, which is subscribed to seahorse in Ubuntu.
https://bugs.launchpad.net/bugs/246364

Title:
  seahorse asks twice for gpg key password

Status in seahorse:
  Invalid
Status in enigmail package in Ubuntu:
  Confirmed
Status in seahorse package in Ubuntu:
  Invalid
Status in thunderbird package in Ubuntu:
  Invalid

Bug description:
  Binary package hint: seahorse

  Recently I've installed Hardy. When I'm sending an email with
  Thunderbird, Enigmail asks twice for my gpg password, even though I've
  typed it correctly. This happens on Enigmail from Ubuntu package, and
  on the one downloaded from addons.mozilla.org. Same version of
  enigmail worked properly on Gutsy so it might be a Thunderbird bug.

  Edit: it's a seahorse issue. I've checked an option to remember the
  GPG password and ask before using it and now I get 2 questions about
  using my GPG password.

  Edit2: OK, now I get it. It happens when I choose the option to not
  remember my GPG passwords.

To manage notifications about this bug go to:
https://bugs.launchpad.net/seahorse/+bug/246364/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to