Move test utility functions to a common place.

Also removes the dev_mode flag from Firmware Image verification as key signature for the firmware should be checked whether or not dev mode is enabled.

BUG=670
TEST=All tests still pass.

Merge remote branch 'refs/remotes/origin/master' into fixtests

Fix tests, remove dev mode. Move common code.

Review URL: http://codereview.chromium.org/1280002
This commit is contained in:
Gaurav Shah
2010-03-25 13:04:45 -07:00
parent 7853971362
commit 3199eed3d3
13 changed files with 362 additions and 500 deletions

View File

@@ -226,8 +226,8 @@ bool FirmwareUtility::VerifySignedImage(void) {
cerr << "Couldn't read firmware image or malformed image.\n";
return false;
}
if (!(error = VerifyFirmwareImage(root_key_pub_, image_,
0))) // Trusted Mode.
if (VERIFY_FIRMWARE_SUCCESS ==
(error = VerifyFirmwareImage(root_key_pub_, image_)))
return true;
cerr << VerifyFirmwareErrorString(error) << "\n";
return false;;