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

Side by Side Diff: utility/vbutil_firmware.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 | « tests/vboot_common3_tests.c ('k') | utility/vbutil_kernel.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 * Verified boot firmware utility 5 * Verified boot firmware utility
6 */ 6 */
7 7
8 #include <getopt.h> 8 #include <getopt.h>
9 #include <inttypes.h> /* For PRIu64 */ 9 #include <inttypes.h> /* For PRIu64 */
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 return 1; 94 return 1;
95 } 95 }
96 96
97 /* Read the key block and keys */ 97 /* Read the key block and keys */
98 key_block = (VbKeyBlockHeader*)ReadFile(keyblock_file, &key_block_size); 98 key_block = (VbKeyBlockHeader*)ReadFile(keyblock_file, &key_block_size);
99 if (!key_block) { 99 if (!key_block) {
100 error("Error reading key block.\n"); 100 error("Error reading key block.\n");
101 return 1; 101 return 1;
102 } 102 }
103 103
104 signing_key = PrivateKeyRead(signprivate, key_block->data_key.algorithm); 104 signing_key = PrivateKeyReadPem(signprivate, key_block->data_key.algorithm);
105 if (!signing_key) { 105 if (!signing_key) {
106 error("Error reading signing key.\n"); 106 error("Error reading signing key.\n");
107 return 1; 107 return 1;
108 } 108 }
109 109
110 kernel_subkey = PublicKeyRead(kernelkey_file); 110 kernel_subkey = PublicKeyRead(kernelkey_file);
111 if (!kernel_subkey) { 111 if (!kernel_subkey) {
112 error("Error reading kernel subkey.\n"); 112 error("Error reading kernel subkey.\n");
113 return 1; 113 return 1;
114 } 114 }
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 case OPT_MODE_VBLOCK: 321 case OPT_MODE_VBLOCK:
322 return Vblock(filename, key_block_file, signprivate, version, fv_file, 322 return Vblock(filename, key_block_file, signprivate, version, fv_file,
323 kernelkey_file); 323 kernelkey_file);
324 case OPT_MODE_VERIFY: 324 case OPT_MODE_VERIFY:
325 return Verify(filename, signpubkey, fv_file); 325 return Verify(filename, signpubkey, fv_file);
326 default: 326 default:
327 printf("Must specify a mode.\n"); 327 printf("Must specify a mode.\n");
328 return PrintHelp(); 328 return PrintHelp();
329 } 329 }
330 } 330 }
OLDNEW
« no previous file with comments | « tests/vboot_common3_tests.c ('k') | utility/vbutil_kernel.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698