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

Side by Side Diff: utility/load_kernel_test.c

Issue 6719005: Cherry-pick vboot_reference files from TOT to support crossystem (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@0.11.257.B
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « utility/crossystem_main.c ('k') | utility/tlcl_generator.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 5
6 /* Routines for verifying a file's signature. Useful in testing the core 6 /* Routines for verifying a file's signature. Useful in testing the core
7 * RSA verification implementation. 7 * RSA verification implementation.
8 */ 8 */
9 9
10 #include <inttypes.h> /* For PRIu64 macro */ 10 #include <inttypes.h> /* For PRIu64 macro */
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 if (key_blob) { 164 if (key_blob) {
165 gbb->rootkey_offset = gbb->header_size; 165 gbb->rootkey_offset = gbb->header_size;
166 gbb->rootkey_size = key_size; 166 gbb->rootkey_size = key_size;
167 Memcpy((uint8_t*)gbb + gbb->rootkey_offset, key_blob, key_size); 167 Memcpy((uint8_t*)gbb + gbb->rootkey_offset, key_blob, key_size);
168 168
169 gbb->recovery_key_offset = gbb->rootkey_offset; 169 gbb->recovery_key_offset = gbb->rootkey_offset;
170 gbb->recovery_key_size = key_size; 170 gbb->recovery_key_size = key_size;
171 } 171 }
172 172
173 /* Initialize the shared data area */ 173 /* Initialize the shared data area */
174 lkp.shared_data_blob = Malloc(LOAD_FIRMWARE_SHARED_DATA_REC_SIZE); 174 lkp.shared_data_blob = Malloc(VB_SHARED_DATA_REC_SIZE);
175 lkp.shared_data_size = LOAD_FIRMWARE_SHARED_DATA_REC_SIZE; 175 lkp.shared_data_size = VB_SHARED_DATA_REC_SIZE;
176 shared = (VbSharedDataHeader*)lkp.shared_data_blob; 176 shared = (VbSharedDataHeader*)lkp.shared_data_blob;
177 if (0 != VbSharedDataInit(shared, lkp.shared_data_size)) { 177 if (0 != VbSharedDataInit(shared, lkp.shared_data_size)) {
178 fprintf(stderr, "Unable to init shared data\n"); 178 fprintf(stderr, "Unable to init shared data\n");
179 return 1; 179 return 1;
180 } 180 }
181 /* Copy in the key blob, if any */ 181 /* Copy in the key blob, if any */
182 if (key_blob) { 182 if (key_blob) {
183 if (0 != VbSharedDataSetKernelKey(shared, (VbPublicKey*)key_blob)) { 183 if (0 != VbSharedDataSetKernelKey(shared, (VbPublicKey*)key_blob)) {
184 fprintf(stderr, "Unable to set key in shared data\n"); 184 fprintf(stderr, "Unable to set key in shared data\n");
185 return 1; 185 return 1;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 lkp.partition_guid[12], 250 lkp.partition_guid[12],
251 lkp.partition_guid[13], 251 lkp.partition_guid[13],
252 lkp.partition_guid[14], 252 lkp.partition_guid[14],
253 lkp.partition_guid[15]); 253 lkp.partition_guid[15]);
254 } 254 }
255 255
256 fclose(image_file); 256 fclose(image_file);
257 Free(lkp.kernel_buffer); 257 Free(lkp.kernel_buffer);
258 return rv != LOAD_KERNEL_SUCCESS; 258 return rv != LOAD_KERNEL_SUCCESS;
259 } 259 }
OLDNEW
« no previous file with comments | « utility/crossystem_main.c ('k') | utility/tlcl_generator.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698