Skip to content

Commit

Permalink
Add comment about nvIndex name.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarske committed Apr 22, 2024
1 parent 377099a commit 7a2a566
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tpm2.c
Original file line number Diff line number Diff line change
Expand Up @@ -4831,6 +4831,9 @@ TPM_RC TPM2_NV_Write(NV_Write_In* in)
TPM2_Packet_Init(ctx, &packet);

TPM2_Packet_AppendU32(&packet, in->authHandle);
/* When using an HMAC or Policy session make sure the NV "name" is
* populated in the TPM2_AUTH_SESSION name.name. This is a computed
* hash (see TPM2_HashNvPublic) */
TPM2_Packet_AppendU32(&packet, in->nvIndex);
TPM2_Packet_AppendAuth(&packet, ctx, &info);

Expand Down

0 comments on commit 7a2a566

Please sign in to comment.