Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1198)

Unified Diff: src/platform/vboot_reference/tests/firmware_image_tests.c

Issue 1578035: Change VerifyFirmware() to take separate pointers to firmware verification header and firmware data. (Closed)
Patch Set: review fixes Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/platform/vboot_reference/tests/firmware_image_tests.c
diff --git a/src/platform/vboot_reference/tests/firmware_image_tests.c b/src/platform/vboot_reference/tests/firmware_image_tests.c
index a2ce472fa08f1a9d9e3850147e4290e924dfd501..96cf9551944386b583a8ad1de0d9d4b5e6877d59 100644
--- a/src/platform/vboot_reference/tests/firmware_image_tests.c
+++ b/src/platform/vboot_reference/tests/firmware_image_tests.c
@@ -15,8 +15,12 @@
#include "utility.h"
/* Normal Firmware Blob Verification Tests. */
-void VerifyFirmwareTest(uint8_t* firmware_blob, uint8_t* root_key_blob) {
- TEST_EQ(VerifyFirmware(root_key_blob, firmware_blob),
+void VerifyFirmwareTest(uint8_t* verification_header,
+ uint8_t* firmware_data,
+ uint8_t* root_key_blob) {
+ TEST_EQ(VerifyFirmware(root_key_blob,
+ verification_header,
+ firmware_data),
VERIFY_FIRMWARE_SUCCESS,
"Normal Firmware Blob Verification");
}
@@ -92,7 +96,9 @@ int main(int argc, char* argv[]) {
firmware_blob = GetFirmwareBlob(image, &firmware_blob_len);
/* Test Firmware blob verify operations. */
- VerifyFirmwareTest(firmware_blob, root_key_blob);
+ VerifyFirmwareTest(firmware_blob,
+ image->firmware_data,
+ root_key_blob);
/* Test FirmwareImage verify operations. */
VerifyFirmwareImageTest(image, root_key_pub);
« no previous file with comments | « src/platform/vboot_reference/tests/big_firmware_tests.c ('k') | src/platform/vboot_reference/tests/firmware_rollback_tests.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698