| 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 * Data structure and API definitions for a verified boot kernel image. | 5 * Data structure and API definitions for a verified boot kernel image. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef VBOOT_REFERENCE_KERNEL_IMAGE_H_ | 8 #ifndef VBOOT_REFERENCE_KERNEL_IMAGE_H_ |
| 9 #define VBOOT_REFERENCE_KERNEL_IMAGE_H_ | 9 #define VBOOT_REFERENCE_KERNEL_IMAGE_H_ |
| 10 | 10 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 * | 99 * |
| 100 * Caller owns the returned pointer and must Free() it. | 100 * Caller owns the returned pointer and must Free() it. |
| 101 */ | 101 */ |
| 102 uint8_t* GetKernelConfigBlob(const KernelImage* image); | 102 uint8_t* GetKernelConfigBlob(const KernelImage* image); |
| 103 | 103 |
| 104 /* Get a verified kernel binary blob from an [image] and fill | 104 /* Get a verified kernel binary blob from an [image] and fill |
| 105 * its length into blob_len. | 105 * its length into blob_len. |
| 106 * | 106 * |
| 107 * Caller owns the returned pointer and must Free() it. | 107 * Caller owns the returned pointer and must Free() it. |
| 108 */ | 108 */ |
| 109 uint8_t* GetKernelBlob(const KernelImage* image, int* blob_len); | 109 uint8_t* GetKernelBlob(const KernelImage* image, uint64_t* blob_len); |
| 110 | 110 |
| 111 /* Write kernel data from [image] to a file named [input_file]. | 111 /* Write kernel data from [image] to a file named [input_file]. |
| 112 * | 112 * |
| 113 * Return 1 on success, 0 on error. | 113 * Return 1 on success, 0 on error. |
| 114 */ | 114 */ |
| 115 int WriteKernelImage(const char* input_file, | 115 int WriteKernelImage(const char* input_file, |
| 116 const KernelImage* image); | 116 const KernelImage* image); |
| 117 | 117 |
| 118 /* Pretty print the contents of [image]. Only headers and metadata information | 118 /* Pretty print the contents of [image]. Only headers and metadata information |
| 119 * is printed. | 119 * is printed. |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 215 |
| 216 /* Add a kernel and kernel config signature to a kernel image [image] | 216 /* Add a kernel and kernel config signature to a kernel image [image] |
| 217 * using the private signing key in file [kernel_sigining_key_file]. | 217 * using the private signing key in file [kernel_sigining_key_file]. |
| 218 * | 218 * |
| 219 * Return 1 on success, 0 on failure. | 219 * Return 1 on success, 0 on failure. |
| 220 */ | 220 */ |
| 221 int AddKernelSignature(KernelImage* image, | 221 int AddKernelSignature(KernelImage* image, |
| 222 const char* kernel_sigining_key_file); | 222 const char* kernel_sigining_key_file); |
| 223 | 223 |
| 224 #endif /* VBOOT_REFERENCE_KERNEL_IMAGE_H_ */ | 224 #endif /* VBOOT_REFERENCE_KERNEL_IMAGE_H_ */ |
| OLD | NEW |