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

Unified Diff: tests/vboot_common3_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 | « tests/vboot_common2_tests.c ('k') | utility/Makefile » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/vboot_common3_tests.c
diff --git a/tests/vboot_common3_tests.c b/tests/vboot_common3_tests.c
index a4e69fd19aa2183469df053f21fa8644c1ae8d0f..1cfdd5190de9a18d6daf2b5553280a97b4c2f8c9 100644
--- a/tests/vboot_common3_tests.c
+++ b/tests/vboot_common3_tests.c
@@ -46,7 +46,8 @@ static void VerifyKeyBlockTest(const VbPublicKey* public_key,
TEST_EQ(VerifyKeyBlock(hdr, hsize, public_key), 0,
"VerifyKeyBlock() ok using key");
- TEST_NEQ(VerifyKeyBlock(hdr, hsize-1, NULL), 0, "VerifyKeyBlock() size");
+ TEST_NEQ(VerifyKeyBlock(hdr, hsize - 1, NULL), 0, "VerifyKeyBlock() size--");
+ TEST_EQ(VerifyKeyBlock(hdr, hsize + 1, NULL), 0, "VerifyKeyBlock() size++");
Memcpy(h, hdr, hsize);
h->magic[0] &= 0x12;
@@ -164,8 +165,10 @@ static void VerifyFirmwarePreambleTest(const VbPublicKey* public_key,
TEST_EQ(VerifyFirmwarePreamble2(hdr, hsize, rsa), 0,
"VerifyFirmwarePreamble2() ok using key");
- TEST_NEQ(VerifyFirmwarePreamble2(hdr, hsize-1, rsa), 0,
- "VerifyFirmwarePreamble2() size");
+ TEST_NEQ(VerifyFirmwarePreamble2(hdr, hsize - 1, rsa), 0,
+ "VerifyFirmwarePreamble2() size--");
+ TEST_EQ(VerifyFirmwarePreamble2(hdr, hsize + 1, rsa), 0,
+ "VerifyFirmwarePreamble2() size++");
/* Care about major version but not minor */
Memcpy(h, hdr, hsize);
@@ -268,13 +271,13 @@ int main(int argc, char* argv[]) {
return 1;
}
- signing_public_key = PublicKeyRead(argv[4], signing_key_algorithm, 1);
+ signing_public_key = PublicKeyReadKeyb(argv[4], signing_key_algorithm, 1);
if (!signing_public_key) {
fprintf(stderr, "Error reading signing_public_key");
return 1;
}
- data_public_key = PublicKeyRead(argv[6], data_key_algorithm, 1);
+ data_public_key = PublicKeyReadKeyb(argv[6], data_key_algorithm, 1);
if (!data_public_key) {
fprintf(stderr, "Error reading data_public_key");
return 1;
« no previous file with comments | « tests/vboot_common2_tests.c ('k') | utility/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698