Skip to content

Commit

Permalink
tpm2: Add padding to OBJECT for 32bit targets
Browse files Browse the repository at this point in the history
The nvram_offsets test fails on 32bit targets due to an unexpected size
of an OBJECT. This was due to missing padding.

Signed-off-by: Stefan Berger <[email protected]>
  • Loading branch information
stefanberger committed Nov 15, 2024
1 parent bdd9a77 commit 8061411
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tpm2/Global.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ typedef struct OBJECT
// this field carries additional metadata
// needed to derive the proof value for
// the object.
#if __LONG_WIDTH__ == 32
UINT8 _pad1[4]; /* 32 bit targets need padding */
#endif

// libtpms added: SEED_COMPAT_LEVEL to use for deriving child keys
SEED_COMPAT_LEVEL seedCompatLevel;
Expand Down

0 comments on commit 8061411

Please sign in to comment.