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

Side by Side Diff: src/platform/vboot_reference/utils/kernel_image.c

Issue 1574005: VBoot Reference: Refactor Part 2 - Crypto Libraries (Closed)
Patch Set: . Created 10 years, 8 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
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 * Functions for generating and manipulating a verified boot kernel image. 5 * Functions for generating and manipulating a verified boot kernel image.
6 * (Userland portion) 6 * (Userland portion)
7 */ 7 */
8 8
9 #include "kernel_image.h" 9 #include "kernel_image.h"
10 10
11 #include <fcntl.h> 11 #include <fcntl.h>
12 #include <stdio.h> 12 #include <stdio.h>
13 #include <sys/types.h> 13 #include <sys/types.h>
14 #include <sys/stat.h> 14 #include <sys/stat.h>
15 #include <unistd.h> 15 #include <unistd.h>
16 16
17 #include "cryptolib.h"
17 #include "file_keys.h" 18 #include "file_keys.h"
18 #include "padding.h"
19 #include "rollback_index.h" 19 #include "rollback_index.h"
20 #include "rsa_utility.h"
21 #include "sha_utility.h"
22 #include "signature_digest.h" 20 #include "signature_digest.h"
23 #include "utility.h" 21 #include "utility.h"
24 22
25 /* Macro to determine the size of a field structure in the KernelImage 23 /* Macro to determine the size of a field structure in the KernelImage
26 * structure. */ 24 * structure. */
27 #define FIELD_LEN(field) (sizeof(((KernelImage*)0)->field)) 25 #define FIELD_LEN(field) (sizeof(((KernelImage*)0)->field))
28 26
29 KernelImage* KernelImageNew(void) { 27 KernelImage* KernelImageNew(void) {
30 KernelImage* image = (KernelImage*) Malloc(sizeof(KernelImage)); 28 KernelImage* image = (KernelImage*) Malloc(sizeof(KernelImage));
31 if (image) { 29 if (image) {
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 Free(kernel_buf); 547 Free(kernel_buf);
550 Free(config_blob); 548 Free(config_blob);
551 return 1; 549 return 1;
552 } 550 }
553 551
554 void PrintKernelEntry(kernel_entry* entry) { 552 void PrintKernelEntry(kernel_entry* entry) {
555 debug("Boot Priority = %d\n", entry->boot_priority); 553 debug("Boot Priority = %d\n", entry->boot_priority);
556 debug("Boot Tries Remaining = %d\n", entry->boot_tries_remaining); 554 debug("Boot Tries Remaining = %d\n", entry->boot_tries_remaining);
557 debug("Boot Success Flag = %d\n", entry->boot_success_flag); 555 debug("Boot Success Flag = %d\n", entry->boot_success_flag);
558 } 556 }
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/utils/firmware_utility.cc ('k') | src/platform/vboot_reference/utils/kernel_image_fw.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698