Do not print line number in debug messages
[oweals/ucert.git] / tests / cram / test_ucert.t
1 check that ucert is producing expected results:
2
3   $ [ -n "$TEST_BIN_DIR" ] && export PATH="$TEST_BIN_DIR:$PATH"
4   $ export TEST_INPUTS="$TESTDIR/inputs"
5   $ alias ucert='valgrind --quiet --leak-check=full ucert'
6
7   $ ucert
8   Usage: ucert <command> <options>
9   Commands:
10     -A:\t\t\tappend signature (needs -c and -x) (esc)
11     -D:\t\t\tdump (needs -c) (esc)
12     -I:\t\t\tissue cert and revoker (needs -c and -p and -s) (esc)
13     -R:\t\t\tprocess revoker certificate (needs -c and -P) (esc)
14     -V:\t\t\tverify (needs -c and -p|-P, may have -m) (esc)
15   Options:
16     -c <file>:\t\tcertificate file (esc)
17     -m <file>:\t\tmessage file (verify only) (esc)
18     -p <file>:\t\tpublic key file (esc)
19     -P <path>:\t\tpublic key directory (verify only) (esc)
20     -q:\t\t\tquiet (do not print verification result, use return code only) (esc)
21     -s <file>:\t\tsecret key file (issue only) (esc)
22     -x <file>:\t\tsignature file (append only) (esc)
23   
24   [1]
25
26   $ ucert -D -c $TEST_INPUTS/key-build.ucert
27   === CHAIN ELEMENT 01 ===
28   signature:
29   ---
30   untrusted comment: signed by key 84bfc88a17166577
31   RWSEv8iKFxZld+bQ+NTqCdDlHOuVYNw5Qw7Q8shjfMgFJcTqrzaqO0bysjIQhTadmcwvWiWvHlyMcwAXSix2BYdfghz/zhDjvgU=
32   ---
33   payload:
34   ---
35   "ucert": {
36   \t"certtype": 1, (esc)
37   \t"validfrom": 1546188410, (esc)
38   \t"expiresat": 1577724410, (esc)
39   \t"pubkey": "untrusted comment: Local build key\\nRWSEv8iKFxZld6vicE1icWhYNfEV9PM7C9MKUKl+YNEKB+PdAWGDF5Z9\\n" (esc)
40   }
41   ---
42   $ ucert-san -D -c $TEST_INPUTS/key-build.ucert
43   === CHAIN ELEMENT 01 ===
44   signature:
45   ---
46   untrusted comment: signed by key 84bfc88a17166577
47   RWSEv8iKFxZld+bQ+NTqCdDlHOuVYNw5Qw7Q8shjfMgFJcTqrzaqO0bysjIQhTadmcwvWiWvHlyMcwAXSix2BYdfghz/zhDjvgU=
48   ---
49   payload:
50   ---
51   "ucert": {
52   \t"certtype": 1, (esc)
53   \t"validfrom": 1546188410, (esc)
54   \t"expiresat": 1577724410, (esc)
55   \t"pubkey": "untrusted comment: Local build key\\nRWSEv8iKFxZld6vicE1icWhYNfEV9PM7C9MKUKl+YNEKB+PdAWGDF5Z9\\n" (esc)
56   }
57   ---
58
59   $ ucert -D -c $TEST_INPUTS/invalid.ucert
60   cert_dump: cannot parse cert
61   [1]
62
63   $ ucert-san -D -c $TEST_INPUTS/invalid.ucert
64   cert_dump: cannot parse cert
65   [1]