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

Side by Side Diff: src/platform/vboot_reference/include/kernel_image.h

Issue 1280002: Move test utility functions to a common place. (Closed)
Patch Set: . Created 10 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
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 * 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 /* Checks for the sanity of the kernel header pointed by [kernel_header_blob]. 135 /* Checks for the sanity of the kernel header pointed by [kernel_header_blob].
136 * If [dev_mode] is enabled, also checks the firmware key signature using the 136 * If [dev_mode] is enabled, also checks the firmware key signature using the
137 * pre-processed public firmware signing key [firmware_sign_key_blob]. 137 * pre-processed public firmware signing key [firmware_sign_key_blob].
138 * 138 *
139 * On success, put firmware signature algorithm in [firmware_algorithm], 139 * On success, put firmware signature algorithm in [firmware_algorithm],
140 * kernel signature algorithm in [kernel_algorithm], kernel header 140 * kernel signature algorithm in [kernel_algorithm], kernel header
141 * length in [header_len], and return 0. 141 * length in [header_len], and return 0.
142 * Else, return error code on failure. 142 * Else, return error code on failure.
143 */ 143 */
144 int VerifyFirmwareHeader(const uint8_t* firmware_sign_key_blob, 144 int VerifyKernelHeader(const uint8_t* firmware_sign_key_blob,
145 const uint8_t* kernel_header_blob, 145 const uint8_t* kernel_header_blob,
146 const int dev_mode, 146 const int dev_mode,
147 int* firmware_algorithm, 147 int* firmware_algorithm,
148 int* kernel_algorithm, 148 int* kernel_algorithm,
149 int* header_len); 149 int* header_len);
150 150
151 /* Checks the kernel config (analogous to preamble for firmware) signature on 151 /* Checks the kernel config (analogous to preamble for firmware) signature on
152 * kernel config pointed by [kernel_config_blob] using the signing key 152 * kernel config pointed by [kernel_config_blob] using the signing key
153 * [kernel_sign_key]. 153 * [kernel_sign_key].
154 * 154 *
155 * On success, put kernel length into [kernel_len], and return 0. 155 * On success, put kernel length into [kernel_len], and return 0.
156 * Else, return error code on failure. 156 * Else, return error code on failure.
157 */ 157 */
158 int VerifyKernelConfig(RSAPublicKey* kernel_sign_key, 158 int VerifyKernelConfig(RSAPublicKey* kernel_sign_key,
159 const uint8_t* kernel_config_blob, 159 const uint8_t* kernel_config_blob,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_ */
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/include/firmware_image.h ('k') | src/platform/vboot_reference/tests/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698