sm: Implement pinentry loopback and reading passphrases from fd.
authorJustus Winter <justus@g10code.com>
Mon, 7 Mar 2016 17:09:41 +0000 (18:09 +0100)
committerJustus Winter <justus@g10code.com>
Mon, 7 Mar 2016 17:16:37 +0000 (18:16 +0100)
commiteea139c56ef55081d8cd8df2a35ce507386e0f17
tree1cda1181beca082d53b439311b84b7639e940a8c
parent53ed98eda77ff2dcf390cebd0cec9f2665661863
sm: Implement pinentry loopback and reading passphrases from fd.

* doc/gpgsm.texi: Document '--pinentry-mode' and '--passphrase-fd'.
* sm/Makefile.am (gpgsm_SOURCES): Add new files
* sm/call-agent.c (struct default_inq_parm_s): New definition.
(start_agent): Pass in the pinentry mode.
(default_inq_cb): Handle 'PASSPHRASE' and 'NEW_PASSPHRASE' inquiries.
Adapt all call sites to the new callback cookie.
* sm/gpgsm.c (cmd_and_opt_values): Add new values.
(opts): Add new options.
(main): Handle new options.
* sm/gpgsm.h (struct opt): Add field 'pinentry_mode'.
* sm/passphrase.c: New file.
* sm/passphrase.h: Likewise.

GnuPG-bug-id: 1970
Signed-off-by: Justus Winter <justus@g10code.com>
doc/gpgsm.texi
sm/Makefile.am
sm/call-agent.c
sm/gpgsm.c
sm/gpgsm.h
sm/passphrase.c [new file with mode: 0644]
sm/passphrase.h [new file with mode: 0644]