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

Unified Diff: src/platform/vboot_reference/include/firmware_image.h

Issue 652216: Vboot reference: A basic user-land verified boot firmware signing and verification utility. (Closed)
Patch Set: Style fixes. Segfault fix. Created 10 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: src/platform/vboot_reference/include/firmware_image.h
diff --git a/src/platform/vboot_reference/include/firmware_image.h b/src/platform/vboot_reference/include/firmware_image.h
index 1a9dc83ea3f29f140335758c11b0fa209d1046f1..9a6ad19d1043f4011b555da20e88dc6f44a7187e 100644
--- a/src/platform/vboot_reference/include/firmware_image.h
+++ b/src/platform/vboot_reference/include/firmware_image.h
@@ -53,12 +53,11 @@ FirmwareImage* FirmwareImageNew(void);
/* Deep free the contents of [fw]. */
void FirmwareImageFree(FirmwareImage* fw);
-/* Read firmware data from file named [input_file] into [image].
+/* Read firmware data from file named [input_file]..
*
- * Returns a filled up FirmwareImage on success, NULL on error.
+ * Returns a filled up FirmwareImage structure on success, NULL on error.
*/
-FirmwareImage* ReadFirmwareImage(const char* input_file,
- FirmwareImage* image);
+FirmwareImage* ReadFirmwareImage(const char* input_file);
/* Write firmware header from [image] to an open file pointed by the
* file descriptor [fd].
@@ -93,7 +92,7 @@ void PrintFirmwareImage(const FirmwareImage* image);
#define VERIFY_FIRMWARE_WRONG_MAGIC 6
#define VERIFY_FIRMWARE_MAX 7 /* Generic catch-all. */
-char* kVerifyFirmwareErrors[VERIFY_FIRMWARE_MAX];
+extern char* kVerifyFirmwareErrors[VERIFY_FIRMWARE_MAX];
/* Checks for the sanity of the firmware header pointed by [header_blob].
* If [dev_mode] is enabled, also checks the root key signature using the
@@ -160,21 +159,21 @@ int VerifyFirmwareImage(const RSAPublicKey* root_key,
const int dev_mode);
/* Maps error codes from VerifyFirmware() to error description. */
-char* VerifyErrorString(int error);
+const char* VerifyFirmwareErrorString(int error);
/* Add a root key signature to the key header to a firmware image [image]
* using the private root key in file [root_key_file].
*
* Return 1 on success, 0 on failure.
*/
-int AddKeySignature(FirmwareImage* image, char* root_key_file);
+int AddFirmwareKeySignature(FirmwareImage* image, const char* root_key_file);
/* Add firmware and preamble signature to a firmware image [image]
* using the private signing key in file [signing_key_file].
*
* Return 1 on success, 0 on failure.
*/
-int AddFirmwareSignature(FirmwareImage* image, char* signing_key_file,
+int AddFirmwareSignature(FirmwareImage* image, const char* signing_key_file,
int algorithm);
#endif /* VBOOT_REFERENCE_FIRMWARE_IMAGE_H_ */
« no previous file with comments | « src/platform/vboot_reference/include/file_keys.h ('k') | src/platform/vboot_reference/include/firmware_utility.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698