Lines Matching refs:key2
28 struct vb2_packed_key *key2; in test_unpack_key() local
32 key2 = (struct vb2_packed_key *)malloc(size); in test_unpack_key()
34 memcpy(key2, key, size); in test_unpack_key()
35 TEST_SUCC(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key()
38 memcpy(key2, key, size); in test_unpack_key()
39 key2->key_offset += 4; in test_unpack_key()
40 TEST_EQ(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key()
44 memcpy(key2, key, size); in test_unpack_key()
45 key2->c.fixed_size += size; in test_unpack_key()
46 TEST_EQ(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key()
50 memcpy(key2, key, size); in test_unpack_key()
51 key2->c.desc_size = 0; in test_unpack_key()
52 TEST_SUCC(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key()
56 memcpy(key2, key, size); in test_unpack_key()
57 key2->c.magic++; in test_unpack_key()
58 TEST_EQ(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key()
62 memcpy(key2, key, size); in test_unpack_key()
63 key2->c.struct_version_major++; in test_unpack_key()
64 TEST_EQ(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key()
77 memcpy(key2, key, size); in test_unpack_key()
78 key2->c.struct_version_minor++; in test_unpack_key()
79 TEST_SUCC(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key()
82 memcpy(key2, key, size); in test_unpack_key()
83 key2->sig_alg = VB2_SIG_INVALID; in test_unpack_key()
84 TEST_EQ(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key()
88 memcpy(key2, key, size); in test_unpack_key()
89 key2->hash_alg = VB2_HASH_INVALID; in test_unpack_key()
90 TEST_EQ(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key()
94 memcpy(key2, key, size); in test_unpack_key()
95 key2->key_size -= 4; in test_unpack_key()
96 TEST_EQ(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key()
100 memcpy(key2, key, size); in test_unpack_key()
101 key2->key_offset--; in test_unpack_key()
102 TEST_EQ(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key()
106 memcpy(key2, key, size); in test_unpack_key()
107 *(uint32_t *)((uint8_t *)key2 + key2->key_offset) /= 2; in test_unpack_key()
108 TEST_EQ(vb2_unpack_key(&pubk, (uint8_t *)key2, size), in test_unpack_key()
112 free(key2); in test_unpack_key()
251 struct vb2_packed_key *key2 = NULL; in test_algorithm() local
267 TEST_SUCC(vb2_public_key_pack(&key2, pubk), "Pack public key"); in test_algorithm()
273 test_unpack_key(key2); in test_algorithm()
277 free(key2); in test_algorithm()