mirror of
git://git.gnupg.org/gnupg.git
synced 2024-10-31 20:08:43 +01:00
3248182d1b
* tests/fake-pinentries/README.txt and tests/fake-pinentries/fake-pinentry.{sh,py,pl,php}}: New public domain (CC0) files to encourage better test suite practices from downstream developers. * tests/fake-pinentries/COPYING (new): a copy of https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
28 lines
686 B
Perl
Executable File
28 lines
686 B
Perl
Executable File
#!/usr/bin/perl -w
|
|
# Use this for your test suites when a perl interpreter is available.
|
|
#
|
|
# The encrypted keys in your test suite that you expect to work must
|
|
# be locked with a passphrase of "passphrase"
|
|
#
|
|
# Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
|
|
#
|
|
# License: Creative Commons Zero ("Public Domain Dedication") --
|
|
# Anyone may reuse it, modify it, redistribute it for any purpose.
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
# turn off buffering
|
|
$| = 1;
|
|
|
|
print "OK This is only for test suites, and should never be used in production\n";
|
|
while (<STDIN>) {
|
|
chomp;
|
|
next if (/^$/);
|
|
next if (/^#/);
|
|
print ("D passphrase\n") if (/^getpin/i);
|
|
print "OK\n";
|
|
exit if (/^bye/i);
|
|
}
|
|
1;
|