Lines Matching refs:hdr
34 VbKeyBlockHeader *hdr;
38 hdr = KeyBlockCreate(data_key, private_key, 0x1234);
39 TEST_NEQ((size_t)hdr, 0, "KeyBlockVerify() prerequisites");
40 if (!hdr)
42 hsize = (unsigned) hdr->key_block_size;
45 TEST_EQ(KeyBlockVerify(hdr, hsize, NULL, 1), 0,
47 TEST_EQ(KeyBlockVerify(hdr, hsize, public_key, 0), 0,
49 TEST_NEQ(KeyBlockVerify(hdr, hsize, NULL, 0), 0,
52 TEST_NEQ(KeyBlockVerify(hdr, hsize - 1, NULL, 1), 0,
54 TEST_EQ(KeyBlockVerify(hdr, hsize + 1, NULL, 1), 0,
57 Memcpy(h, hdr, hsize);
63 Memcpy(h, hdr, hsize);
69 Memcpy(h, hdr, hsize);
75 Memcpy(h, hdr, hsize);
81 Memcpy(h, hdr, hsize);
88 Memcpy(h, hdr, hsize);
94 Memcpy(h, hdr, hsize);
100 Memcpy(h, hdr, hsize);
106 Memcpy(h, hdr, hsize);
112 Memcpy(h, hdr, hsize);
118 Memcpy(h, hdr, hsize);
123 Memcpy(h, hdr, hsize);
129 Memcpy(h, hdr, hsize);
137 Memcpy(h, hdr, hsize);
153 free(hdr);
170 VbFirmwarePreambleHeader *hdr;
179 hdr = CreateFirmwarePreamble(0x1234, kernel_subkey, body_sig,
181 TEST_NEQ(hdr && rsa, 0, "VerifyFirmwarePreamble() prerequisites");
182 if (!hdr)
184 hsize = (unsigned) hdr->preamble_size;
187 TEST_EQ(VerifyFirmwarePreamble(hdr, hsize, rsa), 0,
189 TEST_NEQ(VerifyFirmwarePreamble(hdr, 4, rsa), 0,
191 TEST_NEQ(VerifyFirmwarePreamble(hdr, hsize - 1, rsa), 0,
193 TEST_EQ(VerifyFirmwarePreamble(hdr, hsize + 1, rsa), 0,
197 Memcpy(h, hdr, hsize);
203 Memcpy(h, hdr, hsize);
209 Memcpy(h, hdr, hsize);
215 Memcpy(h, hdr, hsize);
222 Memcpy(h, hdr, hsize);
228 Memcpy(h, hdr, hsize);
234 Memcpy(h, hdr, hsize);
240 Memcpy(h, hdr, hsize);
250 Memcpy(h, hdr, hsize);
256 Memcpy(h, hdr, hsize);
263 Memcpy(h, hdr, hsize);
274 free(hdr);