/external/vboot_reference/tests/ |
D | vb21_common2_tests.c | 27 struct vb2_public_key pubk; in test_unpack_key() local 35 TEST_SUCC(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key() 40 TEST_EQ(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key() 46 TEST_EQ(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key() 52 TEST_SUCC(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key() 54 TEST_EQ(strcmp(pubk.desc, ""), 0, " empty desc string"); in test_unpack_key() 58 TEST_EQ(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key() 64 TEST_EQ(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key() 79 TEST_SUCC(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key() 84 TEST_EQ(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key() [all …]
|
D | vb20_common2_tests.c | 26 struct vb2_public_key pubk; in test_unpack_key() local 37 TEST_SUCC(vb2_unpack_key(&pubk, buf, size), "vb2_unpack_key() ok"); in test_unpack_key() 39 TEST_EQ(pubk.sig_alg, vb2_crypto_to_signature(key->algorithm), in test_unpack_key() 41 TEST_EQ(pubk.hash_alg, vb2_crypto_to_hash(key->algorithm), in test_unpack_key() 47 TEST_EQ(vb2_unpack_key(&pubk, buf, size), in test_unpack_key() 53 TEST_EQ(vb2_unpack_key(&pubk, buf, size), in test_unpack_key() 59 TEST_EQ(vb2_unpack_key(&pubk, buf, size + 1), in test_unpack_key() 65 TEST_EQ(vb2_unpack_key(&pubk, buf, size), in test_unpack_key() 70 TEST_EQ(vb2_unpack_key(&pubk, buf, size - 1), in test_unpack_key() 85 struct vb2_public_key pubk, pubk_orig; in test_verify_data() local [all …]
|
D | vb21_common_tests.c | 222 struct vb2_public_key pubk; in test_verify_hash() local 231 TEST_SUCC(vb2_public_key_hash(&pubk, VB2_HASH_SHA256), in test_verify_hash() 239 sig, &pubk, &wb), in test_verify_hash() 243 TEST_EQ(vb2_verify_data(test_data, sizeof(test_data), sig, &pubk, &wb), in test_verify_hash() 256 struct vb2_public_key pubk, pubk2, pubk3; in test_verify_keyblock() local 266 TEST_SUCC(vb2_public_key_hash(&pubk, VB2_HASH_SHA256), in test_verify_keyblock() 292 TEST_SUCC(vb2_verify_keyblock(kbuf, buf_size, &pubk, &wb), in test_verify_keyblock() 306 TEST_EQ(vb2_verify_keyblock(kbuf, buf_size, &pubk, &wb), in test_verify_keyblock() 312 TEST_EQ(vb2_verify_keyblock(kbuf, buf_size, &pubk, &wb), in test_verify_keyblock() 318 TEST_EQ(vb2_verify_keyblock(kbuf, buf_size, &pubk, &wb), in test_verify_keyblock() [all …]
|
D | vb21_host_sig_tests.c | 45 struct vb2_public_key *pubk, pubhash; in sig_tests() local 68 TEST_SUCC(vb2_public_key_read_keyb(&pubk, keybfile), "Read pub key"); in sig_tests() 69 pubk->guid = &test_guid; in sig_tests() 70 pubk->hash_alg = combo->hash_alg; in sig_tests() 71 vb2_public_key_set_desc(pubk, test_desc); in sig_tests() 90 TEST_SUCC(vb2_verify_data(test_data, test_size, sig, pubk, &wb), in sig_tests() 129 TEST_SUCC(vb2_verify_data(buf, c_sig_offs, sig, pubk, &wb), in sig_tests() 147 TEST_SUCC(vb2_verify_data(buf, c_sig_offs, sig, pubk, &wb), in sig_tests() 163 vb2_public_key_free(pubk); in sig_tests()
|
/external/vboot_reference/host/lib21/ |
D | host_key.c | 458 const struct vb2_public_key *pubk) in vb2_public_key_pack() argument 472 key.c.desc_size = vb2_desc_size(pubk->desc); in vb2_public_key_pack() 475 if (pubk->sig_alg != VB2_SIG_NONE) { in vb2_public_key_pack() 476 key.key_size = vb2_packed_key_size(pubk->sig_alg); in vb2_public_key_pack() 484 key.key_version = pubk->version; in vb2_public_key_pack() 485 key.sig_alg = pubk->sig_alg; in vb2_public_key_pack() 486 key.hash_alg = pubk->hash_alg; in vb2_public_key_pack() 487 key.guid = *pubk->guid; in vb2_public_key_pack() 496 if (pubk->desc && *pubk->desc) { in vb2_public_key_pack() 497 strcpy((char *)(buf + key.c.fixed_size), pubk->desc); in vb2_public_key_pack() [all …]
|
/external/vboot_reference/host/lib21/include/ |
D | host_key2.h | 204 const struct vb2_public_key *pubk);
|