aboutsummaryrefslogtreecommitdiffstats
path: root/tests/openpgp/fake-pinentry.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* indent: Fix spellingDaniel Kahn Gillmor2024-05-311-1/+1
| | | | | | | | | | | | | -- These are non-substantive corrections for minor spelling mistakes within the GnuPG codebase. With something like this applied to the codebase, and a judiciously tuned spellchecker integrated as part of a standard test suite, it should be possible to keep a uniform orthography within the project. GnuPG-bug-id: 7116
* tests: Simplify fake-pinentry to use the option only.NIIBE Yutaka2022-12-021-31/+41
| | | | | | | | | | | * tests/openpgp/fake-pinentry.c (parse_pinentry_user_data): New. (main): Don't use PINENTRY_USER_DATA env var. -- Since environment variable is unreliable, use the option only. Signed-off-by: NIIBE Yutaka <[email protected]>
* tests: Fix fake-pinentry for Windows.NIIBE Yutaka2022-12-021-8/+1
| | | | | | | | | | | | | | * tests/openpgp/fake-pinentry.c (main): Override PINENTRY_USER_DATA, by the option. -- In the Assuan implementation for Windows, spawn function doesn't call the atfork callback. Thus, the environment variable is not updated by gpg-agent when it spawns pinentry. Reliable way is the interaction to override the option. Signed-off-by: NIIBE Yutaka <[email protected]>
* tests: Minor memory fix.NIIBE Yutaka2017-04-171-0/+2
| | | | | | * tests/openpgp/fake-pinentry.c (get_passphrase): Free the memory. Signed-off-by: NIIBE Yutaka <[email protected]>
* Change all http://www.gnu.org in license notices to https://Werner Koch2016-11-051-1/+1
| | | | --
* tests: Improve portability of fake-pinentry.Werner Koch2016-10-261-21/+28
| | | | | | | | | * tests/openpgp/fake-pinentry.c: Make all functions static. (get_passphrase): s/unlink/remove/ because that is standard C. (spacep): Rename to whitespace and change all callers. (main): Move macro out of if-then chain. Signed-off-by: Werner Koch <[email protected]>
* agent,tests,w32: Fix relaying pinentry user data, fix fake-pinentry.Justus Winter2016-10-251-7/+58
| | | | | | | | | | | | | * agent/call-pinentry.c (start_pinentry): Also send the user data using an Assuan 'OPTION' command. * tests/openpgp/fake-pinentry.c (get_passphrase): Fix updating passphrase file. (spacep): Include newline characters. (rstrip): New function. (main): Handle Windows line endings. Handle the userdata option, and restart with the new options. Signed-off-by: Justus Winter <[email protected]>
* tests: Flush stdout in the fake pinentry.Justus Winter2016-10-201-0/+1
| | | | | | | * tests/openpgp/fake-pinentry.c (reply): Flush stdout. Fixes-commit: 94504b3d5af126abb591dedda1ca0f0970822f55 Signed-off-by: Justus Winter <[email protected]>
* tests: Add test for ssh support.Justus Winter2016-07-191-1/+5
| | | | | | | | | | | | | | | | * tests/gpgscm/tests.scm (path-expand): New function. * tests/openpgp/Makefile.am (TESTS): Add new test. (sample_keys): Add new keys. (CLEANFILES): Clean ssh socket and control file. * tests/openpgp/fake-pinentry.c (main): Add a default passphrase. * tests/openpgp/gpg-agent.conf.tmpl: Enable ssh support. * tests/openpgp/samplekeys/ssh-dsa.key: New file. * tests/openpgp/samplekeys/ssh-ecdsa.key: Likewise. * tests/openpgp/samplekeys/ssh-ed25519.key: Likewise. * tests/openpgp/samplekeys/ssh-rsa.key: Likewise. * tests/openpgp/ssh.scm: Likewise. Signed-off-by: Justus Winter <[email protected]>
* tests: Add support for a passphrase queue to fake pinentry.Justus Winter2016-05-231-2/+94
| | | | | | | * tests/openpgp/fake-pinentry.c (get_passphrase): New function. (main): Add option --passphrasefile and read passphrases from it. Signed-off-by: Justus Winter <[email protected]>
* tests: Add logging to fake pinentry.Justus Winter2016-05-231-14/+108
| | | | | | | | | * tests/openpgp/fake-pinentry.c (log_stream): New variable. (reply): New function. (spacep,skip_options,option_value): Copy from common. (main): Parse arguments, add --logfile option, write logfile. Signed-off-by: Justus Winter <[email protected]>
* tests: Set fake-pinentry's stdout and stdin to _IOLBF.Werner Koch2016-04-141-2/+19
| | | | | | | | * tests/openpgp/fake-pinentry.c (main): Call setvbuf. Show passphrase at startup. Increase buffer. -- Signed-off-by: Werner Koch <[email protected]>
* tests/openpgp: Reimplement 'pinentry.sh' in c.Justus Winter2016-02-231-0/+50
* tests/openpgp/Makefile.am: Build new program. * tests/openpgp/defs.inc: Use the new program. * tests/openpgp/fake-pinentry.c: New file. -- Building an executable that does not require an interpreter makes it easier to use on Windows. Signed-off-by: Justus Winter <[email protected]>