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

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

Issue 1088001: Add --describe flag to {firmware|kernel}_utility. (Closed)
Patch Set: Review fixes 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
« no previous file with comments | « no previous file | src/platform/vboot_reference/include/firmware_utility.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 firmware image. 5 * Data structure and API definitions for a verified boot firmware image.
6 */ 6 */
7 7
8 #ifndef VBOOT_REFERENCE_FIRMWARE_IMAGE_H_ 8 #ifndef VBOOT_REFERENCE_FIRMWARE_IMAGE_H_
9 #define VBOOT_REFERENCE_FIRMWARE_IMAGE_H_ 9 #define VBOOT_REFERENCE_FIRMWARE_IMAGE_H_
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 /* Read firmware data from file named [input_file]. 58 /* Read firmware data from file named [input_file].
59 * 59 *
60 * Returns a filled up FirmwareImage structure on success, NULL on error. 60 * Returns a filled up FirmwareImage structure on success, NULL on error.
61 */ 61 */
62 FirmwareImage* ReadFirmwareImage(const char* input_file); 62 FirmwareImage* ReadFirmwareImage(const char* input_file);
63 63
64 /* Get the length of the header for image [image]. */ 64 /* Get the length of the header for image [image]. */
65 int GetFirmwareHeaderLen(const FirmwareImage* image); 65 int GetFirmwareHeaderLen(const FirmwareImage* image);
66 66
67 /* Calculate and store the firmware header checksum of [image]
68 * in [header_checksum].
69 *
70 * [header_checksum] must be a valid pointer to a buffer of
71 * SHA512_DIGEST_SIZE.
72 */
73 void CalculateFirmwareHeaderChecksum(const FirmwareImage *image,
74 uint8_t* header_checksum);
75
67 /* Get firmware header binary blob from an [image]. 76 /* Get firmware header binary blob from an [image].
68 * 77 *
69 * Caller owns the returned pointer and must Free() it. 78 * Caller owns the returned pointer and must Free() it.
70 */ 79 */
71 uint8_t* GetFirmwareHeaderBlob(const FirmwareImage* image); 80 uint8_t* GetFirmwareHeaderBlob(const FirmwareImage* image);
72 81
73 /* Get firmware preamble binary blob from an [image]. 82 /* Get firmware preamble binary blob from an [image].
74 * 83 *
75 * Caller owns the returned pointer and must Free() it. 84 * Caller owns the returned pointer and must Free() it.
76 */ 85 */
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 int AddFirmwareKeySignature(FirmwareImage* image, const char* root_key_file); 192 int AddFirmwareKeySignature(FirmwareImage* image, const char* root_key_file);
184 193
185 /* Add firmware and preamble signature to a firmware image [image] 194 /* Add firmware and preamble signature to a firmware image [image]
186 * using the private signing key in file [signing_key_file]. 195 * using the private signing key in file [signing_key_file].
187 * 196 *
188 * Return 1 on success, 0 on failure. 197 * Return 1 on success, 0 on failure.
189 */ 198 */
190 int AddFirmwareSignature(FirmwareImage* image, const char* signing_key_file); 199 int AddFirmwareSignature(FirmwareImage* image, const char* signing_key_file);
191 200
192 #endif /* VBOOT_REFERENCE_FIRMWARE_IMAGE_H_ */ 201 #endif /* VBOOT_REFERENCE_FIRMWARE_IMAGE_H_ */
OLDNEW
« no previous file with comments | « no previous file | src/platform/vboot_reference/include/firmware_utility.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698