2 # Use this for your test suites when a python interpreter is available.
4 # The encrypted keys in your test suite that you expect to work must
5 # be locked with a passphrase of "passphrase"
7 # Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
9 # License: Creative Commons Zero ("Public Domain Dedication") --
10 # Anyone may reuse it, modify it, redistribute it for any purpose.
15 sys.stdin = os.fdopen(sys.stdin.fileno(), 'r', 0)
16 sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
18 print("OK This is only for test suites, and should never be used in production")
20 ln = sys.stdin.readline()
24 if (ln.strip() == '') or (ln.startswith('#')):
26 if (ln.startswith('getpin')):
27 sys.stdout.write('D passphrase\n')
28 sys.stdout.write('OK\n')
29 if (ln.startswith('bye')):