Skip to content

Commit

Permalink
tpm2: Compare CONTEXT_ENCRYPT_ALG against ALG_AES_VALUE
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Berger <[email protected]>
  • Loading branch information
stefanberger committed Sep 24, 2024
1 parent 2a88301 commit ab3da80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tpm2/NVMarshal.c
Original file line number Diff line number Diff line change
Expand Up @@ -3909,7 +3909,7 @@ static const struct _entry {
{ COMPILE_CONSTANT(NUM_STATIC_PCR, EQ) },
{ COMPILE_CONSTANT(MAX_ALG_LIST_SIZE, EQ) },
{ COMPILE_CONSTANT(PRIMARY_SEED_SIZE, EQ) },
#if CONTEXT_ENCRYPT_ALGORITHM == AES
#if CONTEXT_ENCRYPT_ALG == ALG_AES_VALUE
#define CONTEXT_ENCRYPT_ALGORITHM_ TPM_ALG_AES
#endif
{ COMPILE_CONSTANT(CONTEXT_ENCRYPT_ALGORITHM_, EQ) },
Expand Down Expand Up @@ -3962,6 +3962,7 @@ static const struct _entry {
{ COMPILE_CONSTANT(RH_ACT_E, LE) },
{ COMPILE_CONSTANT(RH_ACT_F, LE) },
};
MUST_BE(CONTEXT_ENCRYPT_ALG == ALG_AES_VALUE);

static TPM_RC
UINT32_Unmarshal_CheckConstant(BYTE **buffer, INT32 *size, UINT32 constant,
Expand Down

0 comments on commit ab3da80

Please sign in to comment.