gpg-agent ignores preset passphrase
Kiss Gabor (Bitman)
kissg at ssg.ki.iif.hu
Fri Aug 22 15:49:32 CEST 2008
-----BEGIN PGP SIGNED MESSAGE-----
> I tried to use "preset passphrase" feature but it does not work.
> Log shows that gpg-agent seemingly receives passphrase but later
> when agent should use the cached passphrase it ask for it again
> from pinentry.
> 2008-07-14 11:10:00 gpg-agent DBG: agent_get_cache `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'...
> 2008-07-14 11:10:00 gpg-agent DBG: ... miss
> 2008-07-14 11:10:00 gpg-agent starting a new PIN Entry
> 2008-07-14 11:10:00 gpg-agent DBG: connection to PIN entry established
(Full text in the archive
Now I started to debug gpg-agent.
I don't know why but now there is a minor difference in the log output:
gpg-agent[21153.7] DBG: <- PRESET_PASSPHRASE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -1 xxxxxxxxxxxxxxxxxxxxxxxxxx
2008-08-22 15:26:53 gpg-agent DBG: agent_put_cache `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' requested ttl=-1 mode=1
gpg-agent[21153.7] DBG: -> OK
gpg-agent[21153.7] DBG: <- [EOF]
2008-08-22 15:27:21 gpg-agent DBG: agent_get_cache `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'...
2008-08-22 15:27:21 gpg-agent DBG: ... hit
2008-08-22 15:27:21 gpg-agent starting a new PIN Entry
I.e. "miss" is changed to "hit". However a new pinentry popup window
Putting some additional log_debug() statements in the code I found that
the critical part is function findkey.c:unprotect().
It retrieves cached passphrase successfully but a few lines below
it calls agent_askpin() unconditionally.
Why does this happen? Could somebody explain me?
And how should I use gpg-preset-passphrase?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Made with pgp4pine 1.76
-----END PGP SIGNATURE-----
More information about the Gnupg-users