/external/vboot_reference/tests/ |
vb2_secdata_tests.c | 50 TEST_SUCC(vb2_secdata_create(&c), "Create"); 51 TEST_SUCC(vb2_secdata_check_crc(&c), "Check created CRC"); 52 TEST_SUCC(vb2_secdata_init(&c), "Init created CRC"); 66 TEST_SUCC(vb2_secdata_get(&c, VB2_SECDATA_FLAGS, &v), "Get flags"); 69 TEST_SUCC(vb2_secdata_set(&c, VB2_SECDATA_FLAGS, 0x12), "Set flags"); 71 TEST_SUCC(vb2_secdata_set(&c, VB2_SECDATA_FLAGS, 0x12), "Set flags 2"); 73 TEST_SUCC(vb2_secdata_get(&c, VB2_SECDATA_FLAGS, &v), "Get flags 2"); 79 TEST_SUCC(vb2_secdata_get(&c, VB2_SECDATA_VERSIONS, &v), 83 TEST_SUCC(vb2_secdata_set(&c, VB2_SECDATA_VERSIONS, 0x123456ff), 86 TEST_SUCC(vb2_secdata_set(&c, VB2_SECDATA_VERSIONS, 0x123456ff) [all...] |
vb21_host_keyblock_tests.c | 40 TEST_SUCC(vb2_public_key_read_keyb(&pubk2048, fname), 46 TEST_SUCC(vb2_public_key_read_keyb(&pubk4096, fname), 52 TEST_SUCC(vb2_public_key_read_keyb(&pubk8192, fname), 58 TEST_SUCC(vb2_private_key_read_pem(&prik4096, fname), 65 TEST_SUCC(vb2_private_key_read_pem(&prik8192, fname), 71 TEST_SUCC(vb2_private_key_hash(&prikhash, VB2_HASH_SHA512), 74 TEST_SUCC(vb2_public_key_hash(&pubkhash, VB2_HASH_SHA512), 77 TEST_SUCC(vb2_public_key_pack(&pakgood, pubk2048), "Test packed key"); 81 TEST_SUCC(vb2_keyblock_create(&kb, pubk2048, prik, 1, 0x1234, NULL), 84 TEST_SUCC(vb2_verify_keyblock(kb, kb->c.total_size, pubk4096, &wb) [all...] |
vb21_host_sig_tests.c | 62 TEST_SUCC(vb2_private_key_read_pem(&prik, pemfile), "Read private key"); 68 TEST_SUCC(vb2_public_key_read_keyb(&pubk, keybfile), "Read pub key"); 73 TEST_SUCC(vb2_private_key_hash(&prihash, combo->hash_alg), 75 TEST_SUCC(vb2_public_key_hash(&pubhash, combo->hash_alg), 82 TEST_SUCC(vb2_sign_data(&sig, test_data, test_size, prik, NULL), 88 TEST_SUCC(vb2_sig_size_for_key(&size, prik, NULL), "Sig size"); 90 TEST_SUCC(vb2_verify_data(test_data, test_size, sig, pubk, &wb), 94 TEST_SUCC(vb2_sign_data(&sig, test_data, test_size, prik, 100 TEST_SUCC(vb2_sign_data(&sig, test_data, test_size, prik, ""), 103 TEST_SUCC(vb2_sig_size_for_key(&size, prik, ""), "Sig size") [all...] |
vb21_host_fw_preamble_tests.c | 50 TEST_SUCC(vb2_public_key_read_keyb(&pubk4096, fname), 56 TEST_SUCC(vb2_private_key_read_pem(&prik4096, fname), 62 TEST_SUCC(vb2_private_key_hash(&prikhash, VB2_HASH_SHA256), 66 TEST_SUCC(vb2_sign_data(hashes + 0, test_data1, sizeof(test_data1), 69 TEST_SUCC(vb2_sign_data(hashes + 1, test_data2, sizeof(test_data2), 72 TEST_SUCC(vb2_sign_data(hashes + 2, test_data3, sizeof(test_data3), 77 TEST_SUCC(vb2_fw_preamble_create(&fp, prik4096, 83 TEST_SUCC(vb2_verify_fw_preamble(fp, fp->c.total_size, pubk4096, &wb),
|
vb21_host_key_tests.c | 46 TEST_SUCC(vb2_private_key_read_pem(&key, pemfile), "Read pem - good"); 61 TEST_SUCC(vb2_private_key_read_pem(&key, pemfile), "Read pem - good2"); 62 TEST_SUCC(vb2_private_key_set_desc(key, testdesc), "Set desc"); 66 TEST_SUCC(vb2_private_key_set_desc(key, NULL), "Clear desc"); 68 TEST_SUCC(vb2_private_key_set_desc(key, testdesc), "Set desc"); 71 TEST_SUCC(vb2_private_key_read_pem(&key, pemfile), "Read pem - good3"); 72 TEST_SUCC(vb2_private_key_set_desc(key, testdesc), "Set desc"); 84 TEST_SUCC(vb2_private_key_write(key, testfile), "Write key good"); 85 TEST_SUCC(vb2_private_key_read(&k2, testfile), "Read key good"); 93 TEST_SUCC(vb2_read_file(testfile, &buf, &bufsize), "Read key raw") [all...] |
vb21_host_misc_tests.c | 47 TEST_SUCC(vb2_write_file(testfile, test_data, sizeof(test_data)), 49 TEST_SUCC(vb2_read_file(testfile, &read_data, &read_size), 61 TEST_SUCC(vb2_write_object(testfile, c), "vb2_write_object() good"); 62 TEST_SUCC(vb2_read_file(testfile, &read_data, &read_size),
|
vb20_common_tests.c | 89 TEST_SUCC(vb2_verify_member_inside(p, 20, p, 6, 11, 3), 91 TEST_SUCC(vb2_verify_member_inside(p, 20, p+4, 4, 8, 4), 128 TEST_SUCC(vb2_verify_packed_key_inside(&k, sizeof(k)+128, &k), 130 TEST_SUCC(vb2_verify_packed_key_inside(&k - 1, 149 TEST_SUCC(vb2_verify_signature_inside(&s, sizeof(s)+128, &s), 151 TEST_SUCC(vb2_verify_signature_inside(&s - 1,
|
test_common.h | 47 int TEST_SUCC(int result, const char* testname);
|
vb2_misc_tests.c | 88 TEST_SUCC(vb2_init_context(&c), "Init context good"); 94 TEST_SUCC(vb2_init_context(&c), "Re-init context good"); 147 TEST_SUCC(vb2_read_gbb_header(&cc, &gbbdest), "read gbb header good"); 148 TEST_SUCC(memcmp(&gbb, &gbbdest, sizeof(gbb)), "read gbb contents"); 166 TEST_SUCC(vb2_read_gbb_header(&cc, &gbbdest), 169 TEST_SUCC(vb2_read_gbb_header(&cc, &gbbdest), 184 TEST_SUCC(vb2_fw_parse_gbb(&cc), "parse gbb"); 292 TEST_SUCC(vb2_check_dev_switch(&cc), "dev mode off"); 302 TEST_SUCC(vb2_check_dev_switch(&cc), "dev mode on"); 312 TEST_SUCC(vb2_check_dev_switch(&cc), "dev mode off") [all...] |
vb21_common_tests.c | 77 TEST_SUCC(vb2_verify_common_header(cbuf, sizeof(cbuf)), 132 TEST_SUCC(vb2_verify_common_member(cbuf, &m, c->total_size - 8, 4), 137 TEST_SUCC(vb2_verify_common_member(cbuf, &m, desc_end, 4), 173 TEST_SUCC(vb2_verify_common_subobject(cbuf, &m, desc_end), 229 TEST_SUCC(vb2_private_key_hash(&prik, VB2_HASH_SHA256), 231 TEST_SUCC(vb2_public_key_hash(&pubk, VB2_HASH_SHA256), 235 TEST_SUCC(vb2_sign_data(&sig, test_data, sizeof(test_data), prik, NULL), 238 TEST_SUCC(vb2_verify_data(test_data, sizeof(test_data), 266 TEST_SUCC(vb2_public_key_hash(&pubk, VB2_HASH_SHA256), 268 TEST_SUCC(vb2_public_key_hash(&pubk2, VB2_HASH_SHA512) [all...] |
vb2_api_tests.c | 105 TEST_SUCC(vb2api_secdata_create(&cc), "secdata create"); 106 TEST_SUCC(vb2api_secdata_check(&cc), "secdata check 2"); 120 TEST_SUCC(vb2api_fw_phase1(&cc), "phase1 good"); 157 TEST_SUCC(vb2api_fw_phase2(&cc), "phase2 good"); 162 TEST_SUCC(vb2api_fw_phase2(&cc), "phase1 dev"); 189 TEST_SUCC(vb2api_get_pcr_digest( 198 TEST_SUCC(vb2api_get_pcr_digest(
|
vb21_common2_tests.c | 35 TEST_SUCC(vb2_unpack_key(&pubk, (uint8_t *)key2, size), 52 TEST_SUCC(vb2_unpack_key(&pubk, (uint8_t *)key2, size), 79 TEST_SUCC(vb2_unpack_key(&pubk, (uint8_t *)key2, size), 127 TEST_SUCC(vb2_verify_signature(sig2, size), "verify_sig ok"); 139 TEST_SUCC(vb2_verify_signature(sig2, size), "verify_sig minor ver"); 256 TEST_SUCC(vb2_private_key_read_pem(&prik, filename), 263 TEST_SUCC(vb2_public_key_read_keyb(&pubk, filename), 267 TEST_SUCC(vb2_public_key_pack(&key2, pubk), "Pack public key"); 270 TEST_SUCC(vb2_sign_data(&sig2, test_data, test_size, prik, ""),
|
vb20_common3_tests.c | 47 TEST_SUCC(vb2_unpack_key(&key, (uint8_t *)public_key, 60 TEST_SUCC(vb2_verify_keyblock(h, hsize, &key, &wb), 69 TEST_SUCC(vb2_verify_keyblock(h, hsize + 1, &key, &wb), 95 TEST_SUCC(vb2_verify_keyblock(h, hsize, &key, &wb), 101 TEST_SUCC(vb2_verify_keyblock(h, hsize, &key, &wb), 189 TEST_SUCC(vb2_unpack_key(&rsa, (uint8_t *)public_key, 204 TEST_SUCC(vb2_verify_fw_preamble(h, hsize, &rsa, &wb), 219 TEST_SUCC(vb2_verify_fw_preamble(h, hsize + 1, &rsa, &wb), 240 TEST_SUCC(vb2_verify_fw_preamble(h, hsize, &rsa, &wb),
|
vb2_sha_tests.c | 47 TEST_SUCC(vb2_digest(test_inputs[i], 71 TEST_SUCC(vb2_digest(test_inputs[i], 95 TEST_SUCC(vb2_digest(test_inputs[i],
|
vb20_api_tests.c | 218 TEST_SUCC(vb2api_fw_phase3(&cc), "phase3 good"); 242 TEST_SUCC(vb2api_init_hash(&cc, VB2_HASH_TAG_FW_BODY, &size), 257 TEST_SUCC(vb2api_init_hash(&cc, VB2_HASH_TAG_FW_BODY, NULL), 302 TEST_SUCC(vb2api_extend_hash(&cc, mock_body, 32), 306 TEST_SUCC(vb2api_extend_hash(&cc, mock_body, mock_body_size - 32), 338 TEST_SUCC(vb2api_check_hash(&cc), "check hash good");
|
vb21_api_tests.c | 183 TEST_SUCC(vb2api_fw_phase3(&ctx), "phase3 good"); 211 TEST_SUCC(vb2api_init_hash2(&ctx, test_guid, &size), 228 TEST_SUCC(vb2api_init_hash2(&ctx, test_guid + 2, NULL), 269 TEST_SUCC(vb2api_extend_hash(&ctx, mock_body, 32), 273 TEST_SUCC(vb2api_extend_hash(&ctx, mock_body, mock_body_size - 32), 318 TEST_SUCC(vb2api_check_hash(&ctx), "check hash good");
|
vb2_common_tests.c | 35 TEST_SUCC(vb2_align(&ptr, &size, 4, 16), "vb2_align() aligned"); 44 TEST_SUCC(vb2_align(&ptr, &size, 4, 12), "vb2_align() offset");
|
vb20_misc_tests.c | 182 TEST_SUCC(vb2_load_fw_keyblock(&cc), "keyblock verify"); 280 TEST_SUCC(vb2_load_fw_preamble(&cc), "preamble good"); 348 TEST_SUCC(vb2_load_fw_preamble(&cc), 357 TEST_SUCC(vb2_load_fw_preamble(&cc), 366 TEST_SUCC(vb2_load_fw_preamble(&cc),
|
vb21_misc_tests.c | 189 TEST_SUCC(vb2_load_fw_keyblock(&ctx), "keyblock verify"); 288 TEST_SUCC(vb2_load_fw_preamble(&ctx), "preamble good"); 357 TEST_SUCC(vb2_load_fw_preamble(&ctx), 366 TEST_SUCC(vb2_load_fw_preamble(&ctx), 375 TEST_SUCC(vb2_load_fw_preamble(&ctx),
|
vb20_rsa_padding_tests.c | 56 TEST_SUCC(vb2_rsa_verify_digest(key, sig, test_message_sha1_hash, &wb), 87 TEST_SUCC(vb2_rsa_verify_digest(key, sig, test_message_sha1_hash, &wb),
|
test_common.c | 96 int TEST_SUCC(int result, const char* testname) {
|
vb20_common2_tests.c | 37 TEST_SUCC(vb2_unpack_key(&pubk, buf, size), "vb2_unpack_key() ok");
|
vb2_nvstorage_tests.c | 86 TEST_SUCC(vb2_nv_check_crc(&c), "vb2_nv_check_crc() good");
|