• Home
  • Raw
  • Download

Lines Matching refs:mpreamble

25 static VbFirmwarePreambleHeader mpreamble[2];  variable
59 Memset(mpreamble, 0, sizeof(mpreamble)); in ResetMocks()
66 (uint8_t*)(mpreamble + i) - (uint8_t*)(vblock + i); in ResetMocks()
68 mpreamble[i].header_version_minor = 1; /* Supports preamble flags */ in ResetMocks()
69 mpreamble[i].firmware_version = 4; in ResetMocks()
71 PublicKeyInit(&mpreamble[i].kernel_subkey, in ResetMocks()
72 (uint8_t*)&mpreamble[i].body_signature, 20); in ResetMocks()
73 mpreamble[i].kernel_subkey.algorithm = 7 + i; in ResetMocks()
74 mpreamble[i].body_signature.data_size = 20000 + 1000 * i; in ResetMocks()
126 TEST_NEQ(preamble==mpreamble || preamble==mpreamble+1, 0, in VerifyFirmwarePreamble()
173 mpreamble[hash_fw_index].body_signature.data_size - 1024); in VbExHashFirmwareBody()
177 if (42 == mpreamble[hash_fw_index].body_signature.sig_offset) { in VbExHashFirmwareBody()
183 return mpreamble[hash_fw_index].body_signature.sig_offset; in VbExHashFirmwareBody()
190 TEST_PTR_EQ(sig, &mpreamble[hash_fw_index].body_signature, "Verifying sig"); in VerifyDigest()
289 mpreamble[0].header_version_major = 1; /* Simulate failure */ in LoadFirmwareTest()
300 mpreamble[0].firmware_version = 3; /* Simulate rollback */ in LoadFirmwareTest()
301 mpreamble[1].firmware_version = 0x10001; /* Check overflow */ in LoadFirmwareTest()
313 mpreamble[0].firmware_version = 3; /* Simulate rollback */ in LoadFirmwareTest()
314 mpreamble[1].firmware_version = 0x10001; /* Check overflow */ in LoadFirmwareTest()
324 mpreamble[0].flags = VB_FIRMWARE_PREAMBLE_USE_RO_NORMAL; in LoadFirmwareTest()
335 mpreamble[0].flags = VB_FIRMWARE_PREAMBLE_USE_RO_NORMAL; in LoadFirmwareTest()
337 mpreamble[0].body_signature.sig_size = 1; in LoadFirmwareTest()
350 mpreamble[0].flags = VB_FIRMWARE_PREAMBLE_USE_RO_NORMAL; in LoadFirmwareTest()
351 mpreamble[1].flags = VB_FIRMWARE_PREAMBLE_USE_RO_NORMAL; in LoadFirmwareTest()
361 mpreamble[0].flags = VB_FIRMWARE_PREAMBLE_USE_RO_NORMAL; in LoadFirmwareTest()
362 mpreamble[1].flags = VB_FIRMWARE_PREAMBLE_USE_RO_NORMAL; in LoadFirmwareTest()
377 mpreamble[0].flags = VB_FIRMWARE_PREAMBLE_USE_RO_NORMAL; in LoadFirmwareTest()
378 mpreamble[1].flags = 0; in LoadFirmwareTest()
379 mpreamble[0].firmware_version = 5; in LoadFirmwareTest()
380 mpreamble[1].firmware_version = 6; in LoadFirmwareTest()
400 TEST_EQ(digest_size, mpreamble[0].body_signature.data_size, in LoadFirmwareTest()
405 mpreamble[0].body_signature.sig_offset = VBERROR_UNKNOWN; in LoadFirmwareTest()
416 mpreamble[0].body_signature.sig_offset = 42; /* Mock hashing wrong amount */ in LoadFirmwareTest()
427 mpreamble[0].body_signature.sig_size = 1; /* Mock bad sig */ in LoadFirmwareTest()
438 mpreamble[0].kernel_subkey.key_size = VB_SHARED_DATA_MIN_SIZE + 1; in LoadFirmwareTest()