You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to set up pinentry-touchid the whole day. First I run into the problem of the pinentry symlink using pinentry-curse that I have fixed using forcing the symlink to use pinentry-touchid, but that still has not resolved the issue.
It was obvious that gpg-agent uses pinetrny-touchid but between gpg-agent restarts no Touch ID prompt showed up and instead pinentry-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
where I have discovered that no KeyInfo is passed.
Looking at the gpg-agent.log I noticed that gpg-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 of gpg-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 when gpg-agent's flag ignore-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.
If 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.
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 that
gpg-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 conditionpinentry-touchid/main.go
Line 208 in 3ebb30f
KeyInfo
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
:The text was updated successfully, but these errors were encountered: