summaryrefslogtreecommitdiff
path: root/firmware/2lib/include/2struct.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/2lib/include/2struct.h')
-rw-r--r--firmware/2lib/include/2struct.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/firmware/2lib/include/2struct.h b/firmware/2lib/include/2struct.h
index 5e2757b6..95cf73c7 100644
--- a/firmware/2lib/include/2struct.h
+++ b/firmware/2lib/include/2struct.h
@@ -21,6 +21,7 @@
#define VB2_KEY_BLOCK_FLAG_DEVELOPER_1 0x02 /* Developer switch on */
#define VB2_KEY_BLOCK_FLAG_RECOVERY_0 0x04 /* Not recovery mode */
#define VB2_KEY_BLOCK_FLAG_RECOVERY_1 0x08 /* Recovery mode */
+#define VB2_GBB_HWID_DIGEST_SIZE 32
/****************************************************************************/
@@ -103,6 +104,9 @@ struct vb2_shared_data {
uint32_t gbb_rootkey_offset;
uint32_t gbb_rootkey_size;
+ /* HWID digest from GBB header */
+ uint8_t gbb_hwid_digest[VB2_GBB_HWID_DIGEST_SIZE];
+
/* Offset of preamble from start of vblock */
uint32_t vblock_preamble_offset;
@@ -231,7 +235,7 @@ struct vb2_gbb_header {
uint32_t recovery_key_size;
/* Added in version 1.2 */
- uint8_t hwid_digest[32]; /* SHA-256 of HWID */
+ uint8_t hwid_digest[VB2_GBB_HWID_DIGEST_SIZE]; /* SHA-256 of HWID */
/* Pad to match EXPECETED_VB2_GBB_HEADER_SIZE. Initialize to 0. */
uint8_t pad[48];