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

Unified Diff: utility/vbutil_kernel.c

Issue 3027009: Added size param to VerifyData() (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: Created 10 years, 5 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
« no previous file with comments | « utility/vbutil_firmware.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utility/vbutil_kernel.c
diff --git a/utility/vbutil_kernel.c b/utility/vbutil_kernel.c
index d688e61f20a2abcea299347691fe02a7400811ab..893f889cb39b9a8b15fc8fba22b43ed5deadfdf2 100644
--- a/utility/vbutil_kernel.c
+++ b/utility/vbutil_kernel.c
@@ -661,7 +661,7 @@ static int Verify(const char* infile, const char* signpubkey, int verbose) {
/* Verify preamble */
preamble = bp->preamble;
- if (0 != VerifyKernelPreamble2(
+ if (0 != VerifyKernelPreamble(
preamble, bp->blob_size - key_block->key_block_size, rsa)) {
error("Error verifying preamble.\n");
goto verify_exit;
@@ -676,11 +676,13 @@ static int Verify(const char* infile, const char* signpubkey, int verbose) {
printf(" Body load address: 0x%" PRIx64 "\n", preamble->body_load_address);
printf(" Body size: 0x%" PRIx64 "\n",
preamble->body_signature.data_size);
- printf(" Bootloader address: 0x%" PRIx64 "\n", preamble->bootloader_address);
+ printf(" Bootloader address: 0x%" PRIx64 "\n",
+ preamble->bootloader_address);
printf(" Bootloader size: 0x%" PRIx64 "\n", preamble->bootloader_size);
/* Verify body */
- if (0 != VerifyData(bp->blob, &preamble->body_signature, rsa)) {
+ if (0 != VerifyData(bp->blob, bp->blob_size, &preamble->body_signature,
+ rsa)) {
error("Error verifying kernel body.\n");
goto verify_exit;
}
« no previous file with comments | « utility/vbutil_firmware.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698