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

Side by Side Diff: tests/vboot_common2_tests.c

Issue 2812034: Adding --repack and --headeronly options to vbutil_kernel (Closed) Base URL: ssh://git@chromiumos-git//vboot_reference.git
Patch Set: oops. 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 unified diff | Download patch
« no previous file with comments | « host/linktest/main.c ('k') | tests/vboot_common3_tests.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 * 4 *
5 * Tests for firmware image library. 5 * Tests for firmware image library.
6 */ 6 */
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 10
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 if(argc != 4) { 207 if(argc != 4) {
208 fprintf(stderr, "Usage: %s <key_algorithm> <key> <processed pubkey>" 208 fprintf(stderr, "Usage: %s <key_algorithm> <key> <processed pubkey>"
209 " <signing key> <processed signing key>\n", argv[0]); 209 " <signing key> <processed signing key>\n", argv[0]);
210 return -1; 210 return -1;
211 } 211 }
212 212
213 /* Read verification keys and create a test image. */ 213 /* Read verification keys and create a test image. */
214 key_algorithm = atoi(argv[1]); 214 key_algorithm = atoi(argv[1]);
215 215
216 private_key = PrivateKeyRead(argv[2], key_algorithm); 216 private_key = PrivateKeyReadPem(argv[2], key_algorithm);
217 if (!private_key) { 217 if (!private_key) {
218 fprintf(stderr, "Error reading private_key"); 218 fprintf(stderr, "Error reading private_key");
219 return 1; 219 return 1;
220 } 220 }
221 221
222 public_key = PublicKeyReadKeyb(argv[3], key_algorithm, 1); 222 public_key = PublicKeyReadKeyb(argv[3], key_algorithm, 1);
223 if (!public_key) { 223 if (!public_key) {
224 fprintf(stderr, "Error reading public_key"); 224 fprintf(stderr, "Error reading public_key");
225 return 1; 225 return 1;
226 } 226 }
227 227
228 VerifyPublicKeyToRSA(public_key); 228 VerifyPublicKeyToRSA(public_key);
229 VerifyDataTest(public_key, private_key); 229 VerifyDataTest(public_key, private_key);
230 VerifyDigestTest(public_key, private_key); 230 VerifyDigestTest(public_key, private_key);
231 VerifyKernelPreambleTest(public_key, private_key); 231 VerifyKernelPreambleTest(public_key, private_key);
232 232
233 if (public_key) 233 if (public_key)
234 Free(public_key); 234 Free(public_key);
235 if (private_key) 235 if (private_key)
236 Free(private_key); 236 Free(private_key);
237 237
238 return error_code; 238 return error_code;
239 } 239 }
OLDNEW
« 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