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 7e0c3c9449acf6749c7232979ec9d7fab660be1b..3f7bc801d3bd77605f7daf91b9ab29cc3ec964c0 100644 |
--- a/src/platform/vboot_reference/include/firmware_image.h |
+++ b/src/platform/vboot_reference/include/firmware_image.h |
@@ -64,6 +64,15 @@ FirmwareImage* ReadFirmwareImage(const char* input_file); |
/* Get the length of the header for image [image]. */ |
int GetFirmwareHeaderLen(const FirmwareImage* image); |
+/* Calculate and store the firmware header checksum of [image] |
+ * in [header_checksum]. |
+ * |
+ * [header_checksum] must be a valid pointer to a buffer of |
+ * SHA512_DIGEST_SIZE. |
+ */ |
+void CalculateFirmwareHeaderChecksum(const FirmwareImage *image, |
+ uint8_t* header_checksum); |
+ |
/* Get firmware header binary blob from an [image]. |
* |
* Caller owns the returned pointer and must Free() it. |