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

Unified Diff: tests/vboot_common2_tests.c

Issue 2762009: Add vbutil_key (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: Util to pack/unpack .vbpubk files Created 10 years, 6 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 | « host/linktest/main.c ('k') | tests/vboot_common3_tests.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/vboot_common2_tests.c
diff --git a/tests/vboot_common2_tests.c b/tests/vboot_common2_tests.c
index 361de83e93a1a35b080b2f3130f521ad74bf495d..1b7d4a1936c4fe9b041e928c4263a9a5c32f63af 100644
--- a/tests/vboot_common2_tests.c
+++ b/tests/vboot_common2_tests.c
@@ -91,7 +91,7 @@ static void VerifyKernelPreambleTest(const VbPublicKey* public_key,
rsa = PublicKeyToRSA(public_key);
hdr = CreateKernelPreamble(0x1234, 0x100000, 0x300000, 0x4000, body_sig,
- private_key);
+ 0, private_key);
TEST_NEQ(hdr && rsa, 0, "VerifyKernelPreamble2() prerequisites");
if (!hdr)
return;
@@ -100,8 +100,10 @@ static void VerifyKernelPreambleTest(const VbPublicKey* public_key,
TEST_EQ(VerifyKernelPreamble2(hdr, hsize, rsa), 0,
"VerifyKernelPreamble2() ok using key");
- TEST_NEQ(VerifyKernelPreamble2(hdr, hsize-1, rsa), 0,
- "VerifyKernelPreamble2() size");
+ TEST_NEQ(VerifyKernelPreamble2(hdr, hsize - 1, rsa), 0,
+ "VerifyKernelPreamble2() size--");
+ TEST_EQ(VerifyKernelPreamble2(hdr, hsize + 1, rsa), 0,
+ "VerifyKernelPreamble2() size++");
/* Care about major version but not minor */
Memcpy(h, hdr, hsize);
@@ -191,7 +193,7 @@ int main(int argc, char* argv[]) {
return 1;
}
- public_key = PublicKeyRead(argv[3], key_algorithm, 1);
+ public_key = PublicKeyReadKeyb(argv[3], key_algorithm, 1);
if (!public_key) {
fprintf(stderr, "Error reading public_key");
return 1;
« no previous file with comments | « host/linktest/main.c ('k') | tests/vboot_common3_tests.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698