1 check that blob_parse is producing expected results: 2 3 $ [ -n "$TEST_BIN_DIR" ] && export PATH="$TEST_BIN_DIR:$PATH" 4 $ export TEST_INPUTS="$TESTDIR/inputs" 5 $ export FUZZ_CORPUS="$TESTDIR/../fuzz/corpus" 6 7 $ valgrind --quiet --leak-check=full test-blob-parse $TEST_INPUTS/key-build.ucert 8 === CHAIN ELEMENT 01 === 9 signature: 10 --- 11 untrusted comment: signed by key 84bfc88a17166577 12 RWSEv8iKFxZld+bQ+NTqCdDlHOuVYNw5Qw7Q8shjfMgFJcTqrzaqO0bysjIQhTadmcwvWiWvHlyMcwAXSix2BYdfghz/zhDjvgU= 13 --- 14 payload: 15 --- 16 "ucert": { 17 \t"certtype": 1, (esc) 18 \t"validfrom": 1546188410, (esc) 19 \t"expiresat": 1577724410, (esc) 20 \t"pubkey": "untrusted comment: Local build key\\nRWSEv8iKFxZld6vicE1icWhYNfEV9PM7C9MKUKl+YNEKB+PdAWGDF5Z9\\n" (esc) 21 } 22 --- 23 24 $ valgrind --quiet --leak-check=full test-blob-parse $TEST_INPUTS/signature.ucert 25 === CHAIN ELEMENT 01 === 26 signature: 27 --- 28 untrusted comment: signed by key ca85add129e64bab 29 RWTKha3RKeZLq0Sb8kCH9p/3BcFFud8rJnZiRICyRNhjbbpeZSwO2VhkwGaMd7ujW2/YSvT3O67pB0QguV6czgpP5kLX4AKBaQ4= 30 --- 31 payload: 32 --- 33 "ucert": { 34 \t"certtype": 1, (esc) 35 \t"validfrom": 1588532405, (esc) 36 \t"expiresat": 1620068405, (esc) 37 \t"pubkey": "untrusted comment: Local build key\\nRWTKha3RKeZLq1EaPsqvnXu+FqLMHZIS7nvDgwjpRo69j+th6eihGvQo\\n" (esc) 38 } 39 --- 40 === CHAIN ELEMENT 02 === 41 signature: 42 --- 43 untrusted comment: signed by key ca85add129e64bab 44 RWTKha3RKeZLq9VW9CIMyumCQ4J0iFPLQYXr/YvUhw0OTrwpSh2XpKaRZQNZCXfO8ooMOCvG2TPor2veDjskHP1R2RGPIHp57wA= 45 --- 46 47 $ valgrind --quiet --leak-check=full test-blob-parse $TEST_INPUTS/invalid.ucert 48 cannot parse cert invalid.ucert 49 50 $ test-blob-parse-san $TEST_INPUTS/key-build.ucert 51 === CHAIN ELEMENT 01 === 52 signature: 53 --- 54 untrusted comment: signed by key 84bfc88a17166577 55 RWSEv8iKFxZld+bQ+NTqCdDlHOuVYNw5Qw7Q8shjfMgFJcTqrzaqO0bysjIQhTadmcwvWiWvHlyMcwAXSix2BYdfghz/zhDjvgU= 56 --- 57 payload: 58 --- 59 "ucert": { 60 \t"certtype": 1, (esc) 61 \t"validfrom": 1546188410, (esc) 62 \t"expiresat": 1577724410, (esc) 63 \t"pubkey": "untrusted comment: Local build key\\nRWSEv8iKFxZld6vicE1icWhYNfEV9PM7C9MKUKl+YNEKB+PdAWGDF5Z9\\n" (esc) 64 } 65 --- 66 67 $ test-blob-parse-san $TEST_INPUTS/signature.ucert 68 === CHAIN ELEMENT 01 === 69 signature: 70 --- 71 untrusted comment: signed by key ca85add129e64bab 72 RWTKha3RKeZLq0Sb8kCH9p/3BcFFud8rJnZiRICyRNhjbbpeZSwO2VhkwGaMd7ujW2/YSvT3O67pB0QguV6czgpP5kLX4AKBaQ4= 73 --- 74 payload: 75 --- 76 "ucert": { 77 \t"certtype": 1, (esc) 78 \t"validfrom": 1588532405, (esc) 79 \t"expiresat": 1620068405, (esc) 80 \t"pubkey": "untrusted comment: Local build key\\nRWTKha3RKeZLq1EaPsqvnXu+FqLMHZIS7nvDgwjpRo69j+th6eihGvQo\\n" (esc) 81 } 82 --- 83 === CHAIN ELEMENT 02 === 84 signature: 85 --- 86 untrusted comment: signed by key ca85add129e64bab 87 RWTKha3RKeZLq9VW9CIMyumCQ4J0iFPLQYXr/YvUhw0OTrwpSh2XpKaRZQNZCXfO8ooMOCvG2TPor2veDjskHP1R2RGPIHp57wA= 88 --- 89 90 $ test-blob-parse-san $TEST_INPUTS/invalid.ucert 91 cannot parse cert invalid.ucert 92 93 $ for blob in $(LC_ALL=C find $FUZZ_CORPUS -type f | sort ); do 94 > valgrind --quiet --leak-check=full test-blob-parse $blob; \ 95 > test-blob-parse-san $blob; \ 96 > done 97 cannot parse cert 71520a5c4b5ca73903216857abbad54a8002d44a 98 cannot parse cert 71520a5c4b5ca73903216857abbad54a8002d44a 99 cannot parse cert c1dfd96eea8cc2b62785275bca38ac261256e278 100 cannot parse cert c1dfd96eea8cc2b62785275bca38ac261256e278 101 cannot parse cert c42ac1c46f1d4e211c735cc7dfad4ff8391110e9 102 cannot parse cert c42ac1c46f1d4e211c735cc7dfad4ff8391110e9 103 cannot parse cert crash-1b8fb1be45db3aff7699100f497fb74138f3df4f 104 cannot parse cert crash-1b8fb1be45db3aff7699100f497fb74138f3df4f 105 cannot parse cert crash-333757b203a44751d3535f24b05f467183a96d09 106 cannot parse cert crash-333757b203a44751d3535f24b05f467183a96d09 107 cannot parse cert crash-4c4d2c3c9ade5da9347534e290305c3b9760f627 108 cannot parse cert crash-4c4d2c3c9ade5da9347534e290305c3b9760f627 109 cannot parse cert crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b 110 cannot parse cert crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b 111 cannot parse cert crash-75b146c4e6fac64d3e62236b27c64b50657bab2a 112 cannot parse cert crash-75b146c4e6fac64d3e62236b27c64b50657bab2a 113 cannot parse cert crash-813f3e68661da09c26d4a87dbb9d5099e92be50f 114 cannot parse cert crash-813f3e68661da09c26d4a87dbb9d5099e92be50f 115 cannot parse cert crash-98595faa58ba01d85ba4fd0b109cd3d490b45795 116 cannot parse cert crash-98595faa58ba01d85ba4fd0b109cd3d490b45795 117 cannot parse cert crash-a3585b70f1c7ffbdec10f6dadc964336118485c4 118 cannot parse cert crash-a3585b70f1c7ffbdec10f6dadc964336118485c4 119 cannot parse cert crash-b3585b70f1c7ffbdec10f6dadc964336118485c4 120 cannot parse cert crash-b3585b70f1c7ffbdec10f6dadc964336118485c4 121 cannot parse cert crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1 122 cannot parse cert crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1 123 cannot parse cert crash-df9d1243057b27bbad6211e5a23d1cb699028aa2 124 cannot parse cert crash-df9d1243057b27bbad6211e5a23d1cb699028aa2 125 cannot parse cert crash-e0f8ecc694d96a09a1fced27b2a0838b670d34a0 126 cannot parse cert crash-e0f8ecc694d96a09a1fced27b2a0838b670d34a0 127 cannot parse cert crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2 128 cannot parse cert crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2 129 cannot parse cert valid-blobmsg.bin 130 cannot parse cert valid-blobmsg.bin
This page was automatically generated by LXR 0.3.1. • OpenWrt