Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

age: add --pinentry flag to use pinentry to read passphrase #386

Closed
wants to merge 1 commit into from

Conversation

twpayne
Copy link
Contributor

@twpayne twpayne commented Jan 6, 2022

Fixes #182.

This commit uses https://pkg.go.dev/github.com/twpayne/go-pinentry instead of https://pkg.go.dev/github.com/gopasspw/pinentry because the former provides a more complete API, more robust error handling, and correct escape character handling by default.

If this adds too many dependencies, I'd be happy to strip down https://github.com/twpayne/go-pinentry to reduce the dependencies to a minimum.

@twpayne twpayne force-pushed the pinentry branch 2 times, most recently from 1c675ff to bcb9842 Compare January 9, 2022 16:08
@dominikschulz
Copy link

dominikschulz commented Jan 10, 2022

Author of gopasspw/pinentry here. I do support the proposal to replace gopasspw/pinentry with a different implementation. We have introduced our package for an experimental feature that we currently don't put much focus on. So our pinentry implementation is not our top priority right now (and likely won't be anytime soon). We kept it around primarily because I knew that yubikey-agent was using it.

If go-pinentry looks sane (IMHO it does) age should probably use that instead. And you should consider adopting it for yubikey-agent, too. We'll try to move gopass over to it as well.

@twpayne
Copy link
Contributor Author

twpayne commented Jan 14, 2022

I've updated this to use https://github.com/twpayne/go-pinentry-minimal, which has the same functionality as https://github.com/twpayne/go-pinentry but has no dependencies outside the Go standard library.

@FiloSottile
Copy link
Owner

Thank you @twpayne for the package, and @dominikschulz for chiming in. I've decided we won't merge alternative password input methods in cmd/age, but we'll ship them all in a separate plugin. I'll make sure to support pinentry there and I'll be using the minimal package like in yubikey-agent. See #256 (comment) for a bit more details.

@twpayne twpayne deleted the pinentry branch April 26, 2022 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use pinentry if available
3 participants