File: fake-pinentry.pl

package info (click to toggle)
libgnupg-interface-perl 1.04-6
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 824 kB
  • sloc: perl: 3,828; makefile: 6; sh: 5
file content (28 lines) | stat: -rwxr-xr-x 723 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/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 "test"
#
# Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
#
# License: This trivial work is hereby explicitly placed into the
# public domain.  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 supercalifragilisticexpialidocious\n") if (/^getpin/i);
  print "OK\n";
  exit if (/^bye/i);
}
1;