jorgelbg / pinentry-touchid

Custom GPG pinentry program for macOS that allows using Touch ID for fetching the password from the macOS keychain.
Apache License 2.0
521 stars 23 forks source link

Fix pinentry for GPG ssh-agent emulation #24

Closed eth-p closed 2 years ago

eth-p commented 2 years ago

When using GPG's ssh-agent emulation, pinentry-touchid will panic and crash. This is due to GetPIN expecting the description to always come from a GPG signing request, and panicking when the regex matches don't actually capture anything.

This PR is a quick fix that adds support for the pinentry description provided by GPG's ssh-agent emulation. Tested and works consistently on my M1.