From eee068778cb28ecf3c14e1bf843a95547d72c42d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 18:14:06 +0200 Subject: Adding upstream version 2.2.40. Signed-off-by: Daniel Baumann --- tests/fake-pinentries/fake-pinentry.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 tests/fake-pinentries/fake-pinentry.php (limited to 'tests/fake-pinentries/fake-pinentry.php') diff --git a/tests/fake-pinentries/fake-pinentry.php b/tests/fake-pinentries/fake-pinentry.php new file mode 100755 index 0000000..bc4088f --- /dev/null +++ b/tests/fake-pinentries/fake-pinentry.php @@ -0,0 +1,27 @@ +#!/usr/bin/php + +# +# License: Creative Commons Zero ("Public Domain Dedication") -- +# Anyone may reuse it, modify it, redistribute it for any purpose. + +print("OK This is only for test suites, and should never be used in production\n"); +while (true) { + $line = fgets(STDIN); + if (False === $line) + break; + $line = strtolower(trim($line)); + if (($line === "") || ($line[0] == '#')) + continue; + if ((0 === strncmp("getpin", $line, 6))) + print("D passphrase\n"); + print("OK\n"); + if ((0 === strncmp("bye", $line, 3))) + break; +} +?> -- cgit v1.2.3