| 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 * (Firmware Portion) | 6 * (Firmware Portion) |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #ifndef VBOOT_REFERENCE_KERNEL_IMAGE_FW_H_ | 9 #ifndef VBOOT_REFERENCE_KERNEL_IMAGE_FW_H_ |
| 10 #define VBOOT_REFERENCE_KERNEL_IMAGE_FW_H_ | 10 #define VBOOT_REFERENCE_KERNEL_IMAGE_FW_H_ |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 * | 134 * |
| 135 * The signing key to use for kernel data verification is returned in | 135 * The signing key to use for kernel data verification is returned in |
| 136 * [kernel_sign_key], This must be free-d explicitly by the caller after use. | 136 * [kernel_sign_key], This must be free-d explicitly by the caller after use. |
| 137 * | 137 * |
| 138 * Returns 0 on success, error code on failure. | 138 * Returns 0 on success, error code on failure. |
| 139 */ | 139 */ |
| 140 int VerifyKernelHeader(const uint8_t* firmware_key_blob, | 140 int VerifyKernelHeader(const uint8_t* firmware_key_blob, |
| 141 const uint8_t* kernel_header_blob, | 141 const uint8_t* kernel_header_blob, |
| 142 uint64_t kernel_header_blob_len, | 142 uint64_t kernel_header_blob_len, |
| 143 const int dev_mode, | 143 const int dev_mode, |
| 144 KernelImage *image, | 144 KernelImage* image, |
| 145 RSAPublicKey** kernel_sign_key); | 145 RSAPublicKey** kernel_sign_key); |
| 146 | 146 |
| 147 /* Performs a chained verify of the kernel blob [kernel_blob]. If | 147 /* Performs a chained verify of the kernel blob [kernel_blob]. If |
| 148 * [dev_mode] is 0 [inactive], then the pre-processed public signing key | 148 * [dev_mode] is 0 [inactive], then the pre-processed public signing key |
| 149 * [root_key_blob] is used to verify the signature of the signing key, | 149 * [root_key_blob] is used to verify the signature of the signing key, |
| 150 * else the check is skipped. | 150 * else the check is skipped. |
| 151 * Returns 0 on success, error code on failure. | 151 * Returns 0 on success, error code on failure. |
| 152 * | 152 * |
| 153 * NOTE: The length of the kernel blob is derived from reading the fields | 153 * NOTE: The length of the kernel blob is derived from reading the fields |
| 154 * in the first few bytes of the buffer. This might look risky but in firmware | 154 * in the first few bytes of the buffer. This might look risky but in firmware |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 * BOOT_KERNEL_A_CONTINUE Boot from Kenrel A | 192 * BOOT_KERNEL_A_CONTINUE Boot from Kenrel A |
| 193 * BOOT_KERNEL_B_CONTINUE Boot from Kernel B | 193 * BOOT_KERNEL_B_CONTINUE Boot from Kernel B |
| 194 * BOOT_KERNEL_RECOVERY_CONTINUE Jump to recovery mode | 194 * BOOT_KERNEL_RECOVERY_CONTINUE Jump to recovery mode |
| 195 */ | 195 */ |
| 196 int VerifyKernelDriver_f(uint8_t* firmware_key_blob, | 196 int VerifyKernelDriver_f(uint8_t* firmware_key_blob, |
| 197 kernel_entry* kernelA, | 197 kernel_entry* kernelA, |
| 198 kernel_entry* kernelB, | 198 kernel_entry* kernelB, |
| 199 int dev_mode); | 199 int dev_mode); |
| 200 | 200 |
| 201 #endif /* VBOOT_REFERENCE_KERNEL_IMAGE_FW_H_ */ | 201 #endif /* VBOOT_REFERENCE_KERNEL_IMAGE_FW_H_ */ |
| OLD | NEW |