Open AuHau opened 2 years ago
Interesting, in this case it seems that pinentry-touchid (or rather go-assuan/pinentry) is behaving as expected (partially) if --clear
is passed by the agent the KeyInfo is cleared.
But, TBH I'm not sure what would be a better scenario here, because KeyInfo is needed/used to store the pin/passphrase in the keychain 🤔. We could decide to ignore the --clear
flag but I'm not sure if that is wise because it would go against the default expected behaviour.
Describe the bug
I have been trying to set up
pinentry-touchid
the whole day. First I run into the problem of thepinentry
symlink usingpinentry-curse
that I have fixed using forcing the symlink to usepinentry-touchid
, but that still has not resolved the issue. It was obvious thatgpg-agent
usespinetrny-touchid
but betweengpg-agent
restarts no Touch ID prompt showed up and insteadpinentry-mac
was always shown.I used a custom build from latest master with adding some more logging to see what is going on and discovered that the main function
GetPin()
is not invoked thanks to the condition https://github.com/jorgelbg/pinentry-touchid/blob/3ebb30fcabe3916fe0dc776ac0b555d8983545f3/main.go#L208 where I have discovered that noKeyInfo
is passed.Looking at the
gpg-agent.log
I noticed thatgpg-agent
sents:SETKEYINFO --clear
which might be the issue, yet I have no clue why is that. I have been even digging in the source code ofgpg-agent
itself and this happens only if the cache mode is in ignore mode. I am not sure how is that set, one case is whengpg-agent
's flagignore-cache-for-signing
is enabled which I don't have (see bellow in configuration) or if!ctrl->server_local->use_cache_for_signing
which I don't know how to verify.Some pointers in
gpg-agent
code:SETKEYINFO --clear
cache mode
to ignoreIf anybody would have some pointers then I would be very happy, but now I have spent way too long on this so I am putting it to the ice and maybe returning to it sometime later.
System information
macOS
GPG
gpg --version
: 2.3.3Configuration
gpg-agent
:Logs
gpg-agent
:pinentry-touchid
: