aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/test_cli.py
diff options
context:
space:
mode:
authorNuno Goncalves <[email protected]>2019-11-10 22:06:49 +0100
committerNuno Goncalves <[email protected]>2019-11-11 09:55:28 +0100
commitaab503c6d5194f8e886dff550998007e42e87642 (patch)
tree07543a02c22918966873de716a5333443534abd4 /src/scripts/test_cli.py
parentf2a3ad32bef63764a54e696bf93faeafd5ad8a3e (diff)
cli: pubkey: fingerprint: read from stdin
Signed-off-by: Nuno Goncalves <[email protected]>
Diffstat (limited to 'src/scripts/test_cli.py')
-rwxr-xr-xsrc/scripts/test_cli.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/scripts/test_cli.py b/src/scripts/test_cli.py
index e4da5a898..993284951 100755
--- a/src/scripts/test_cli.py
+++ b/src/scripts/test_cli.py
@@ -314,6 +314,18 @@ mlLtJ5JvZ0/p6zP3x+Y9yPIrAR8L/acG5ItSrAKXzzuqQQZMv4aN
test_cli("fingerprint", ['--no-fsname', pub_der_key],
"83:FC:67:87:30:C7:0C:9C:54:9A:E7:A1:FA:25:83:4C:77:A4:43:16:33:6D:47:3C:CE:4B:91:62:30:97:62:D4")
+ test_cli("fingerprint", ['--no-fsname', pub_key, pub_der_key],
+ "83:FC:67:87:30:C7:0C:9C:54:9A:E7:A1:FA:25:83:4C:77:A4:43:16:33:6D:47:3C:CE:4B:91:62:30:97:62:D4\n"
+ "83:FC:67:87:30:C7:0C:9C:54:9A:E7:A1:FA:25:83:4C:77:A4:43:16:33:6D:47:3C:CE:4B:91:62:30:97:62:D4")
+
+ test_cli("fingerprint", [pub_der_key],
+ pub_der_key +
+ ": 83:FC:67:87:30:C7:0C:9C:54:9A:E7:A1:FA:25:83:4C:77:A4:43:16:33:6D:47:3C:CE:4B:91:62:30:97:62:D4")
+
+ test_cli("fingerprint", ['-'],
+ "83:FC:67:87:30:C7:0C:9C:54:9A:E7:A1:FA:25:83:4C:77:A4:43:16:33:6D:47:3C:CE:4B:91:62:30:97:62:D4",
+ open(pub_key, 'rb').read().decode())
+
valid_sig = "nI4mI1ec14Y7nYUWs2edysAVvkob0TWpmGh5rrYWDA+/W9Fj0ZM21qJw8qa3/avAOIVBO6hoMEVmfJYXlS+ReA=="
test_cli("sign", "--provider=base %s %s" % (priv_key, pub_key), valid_sig)