| OLD | NEW |
| 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 * API definitions for a generating and manipulating verified boot kernel images
. | 5 * API definitions for a generating and manipulating verified boot kernel images
. |
| 6 * (Userland portion.) | 6 * (Userland portion.) |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #ifndef VBOOT_REFERENCE_KERNEL_IMAGE_H_ | 9 #ifndef VBOOT_REFERENCE_KERNEL_IMAGE_H_ |
| 10 #define VBOOT_REFERENCE_KERNEL_IMAGE_H_ | 10 #define VBOOT_REFERENCE_KERNEL_IMAGE_H_ |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 /* Get a verified kernel binary blob from an [image] and fill | 50 /* Get a verified kernel binary blob from an [image] and fill |
| 51 * its length into blob_len. | 51 * its length into blob_len. |
| 52 * | 52 * |
| 53 * Caller owns the returned pointer and must Free() it. | 53 * Caller owns the returned pointer and must Free() it. |
| 54 */ | 54 */ |
| 55 uint8_t* GetKernelBlob(const KernelImage* image, uint64_t* blob_len); | 55 uint8_t* GetKernelBlob(const KernelImage* image, uint64_t* blob_len); |
| 56 | 56 |
| 57 | 57 |
| 58 /* Write kernel data from [image] to a file named [input_file]. | 58 /* Write kernel data from [image] to a file named [input_file]. |
| 59 * If [is_only_vblock] is non-zero, only the verification block is output. | 59 * |
| 60 * If [is_only_vblock] is non-zero, only the verification block (excluding the |
| 61 * actual kernel data) is output. |
| 62 * If [is_subkey_out] is non-zero, only the kernel key verification (subkey) |
| 63 * header is output. |
| 60 * | 64 * |
| 61 * Return 1 on success, 0 on error. | 65 * Return 1 on success, 0 on error. |
| 62 */ | 66 */ |
| 63 int WriteKernelImage(const char* input_file, | 67 int WriteKernelImage(const char* input_file, |
| 64 const KernelImage* image, | 68 const KernelImage* image, |
| 65 int is_only_vblock, | 69 int is_only_vblock, |
| 66 int is_subkey_out); | 70 int is_subkey_out); |
| 67 | 71 |
| 68 /* Create a kernel_data blob from its components and fill | 72 /* Create a kernel_data blob from its components and fill |
| 69 * its length into blob_len, plus some information about the bootloader. | 73 * its length into blob_len, plus some information about the bootloader. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 * using the private signing key in file [kernel_sigining_key_file]. | 111 * using the private signing key in file [kernel_sigining_key_file]. |
| 108 * | 112 * |
| 109 * Return 1 on success, 0 on failure. | 113 * Return 1 on success, 0 on failure. |
| 110 */ | 114 */ |
| 111 int AddKernelSignature(KernelImage* image, | 115 int AddKernelSignature(KernelImage* image, |
| 112 const char* kernel_sigining_key_file); | 116 const char* kernel_sigining_key_file); |
| 113 | 117 |
| 114 void PrintKernelEntry(kernel_entry* entry); | 118 void PrintKernelEntry(kernel_entry* entry); |
| 115 | 119 |
| 116 #endif /* VBOOT_REFERENCE_KERNEL_IMAGE_H_ */ | 120 #endif /* VBOOT_REFERENCE_KERNEL_IMAGE_H_ */ |
| OLD | NEW |