gpg-agent ignores preset passphrase

Kiss Gabor (Bitman) kissg at ssg.ki.iif.hu
Mon Jul 14 11:32:53 CEST 2008


Dear folks,

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.

Is the problem mentioned by Andreas Hartmann fixed?
(http://www.mail-archive.com/gnupg-users@gnupg.org/msg01518.html)

I have gpg-agent version 2.0.0 from Debian package gnupg-agent
2.0.0-5.2.


Detailed logs:

gpg-agent starts and receives passphrase:

2008-07-14 11:07:32 gpg-agent[30422] listening on socket `/tmp/gpg-qj39fc/S.gpg-agent'
2008-07-14 11:07:58 gpg-agent[30423] handler 0x808b688 for fd 7 started
gpg-agent[30423.7] DBG: -> OK Pleased to meet you
gpg-agent[30423.7] DBG: <- OPTION ttyname=/dev/pts/9
gpg-agent[30423.7] DBG: -> OK
gpg-agent[30423.7] DBG: <- OPTION ttytype=xterm
gpg-agent[30423.7] DBG: -> OK
gpg-agent[30423.7] DBG: <- OPTION lc-ctype=en_US
gpg-agent[30423.7] DBG: -> OK
gpg-agent[30423.7] DBG: <- OPTION lc-messages=en_US
gpg-agent[30423.7] DBG: -> OK
gpg-agent[30423.7] DBG: <- PRESET_PASSPHRASE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2008-07-14 11:07:58 gpg-agent[30423] DBG: agent_put_cache `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' requested ttl=-1 mode=1
gpg-agent[30423.7] DBG: -> OK
gpg-agent[30423.7] DBG: <- [EOF]
2008-07-14 11:07:58 gpg-agent[30423] handler 0x808b688 for fd 7 terminated

Later I run gpgsm that contacts gpg-agent:

gpg-agent[30442.0] DBG: -> OK Pleased to meet you
gpg-agent[30442.0] DBG: <- RESET
gpg-agent[30442.0] DBG: -> OK
gpg-agent[30442.0] DBG: <- OPTION ttyname=/dev/pts/9
gpg-agent[30442.0] DBG: -> OK
gpg-agent[30442.0] DBG: <- OPTION ttytype=xterm
gpg-agent[30442.0] DBG: -> OK
gpg-agent[30442.0] DBG: <- OPTION lc-ctype=en_US
gpg-agent[30442.0] DBG: -> OK
gpg-agent[30442.0] DBG: <- OPTION lc-messages=en_US
gpg-agent[30442.0] DBG: -> OK
gpg-agent[30442.0] DBG: <- HAVEKEY xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
gpg-agent[30442.0] DBG: -> OK
gpg-agent[30442.0] DBG: <- ISTRUSTED xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
gpg-agent[30442.0] DBG: -> OK
gpg-agent[30442.0] DBG: <- RESET
gpg-agent[30442.0] DBG: -> OK
gpg-agent[30442.0] DBG: <- SIGKEY xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
gpg-agent[30442.0] DBG: -> OK
gpg-agent[30442.0] DBG: <- SETKEYDESC Please+enter+the+passphrase+to+unlock+the+secret+key+for:%0Ablahblahblah...
gpg-agent[30442.0] DBG: -> OK
gpg-agent[30442.0] DBG: <- SETHASH 2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
gpg-agent[30442.0] DBG: -> OK
gpg-agent[30442.0] DBG: <- PKSIGN
2008-07-14 11:10:00 gpg-agent[30442] DBG: agent_get_cache `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'...
2008-07-14 11:10:00 gpg-agent[30442] DBG: ... miss
2008-07-14 11:10:00 gpg-agent[30442] starting a new PIN Entry
2008-07-14 11:10:00 gpg-agent[30442] DBG: connection to PIN entry established

Then if I enter the same passphrase as for gpg-preset-passphrase
gpg-agent works well.

$GNUPGHOME/gpg-agent.conf:

allow-preset-passphrase
verbose
verbose
verbose
verbose
verbose
debug-level guru
log-file /tmp/gpg-agent.log

Agents running at the moment of calling pinentry:

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
foobar   30423  0.0  0.1   4340   688 ?        Ss   11:07   0:00 gpg-agent --daemon --allow-preset-passphrase --write-env-file=/var/run/foo/gpg-agent-info
foobar   30442  0.0  0.1   4344   956 pts/9    SL+  11:10   0:00 gpg-agent --server

Any hints will be appreciated.

Gabor



More information about the Gnupg-users mailing list