Skip to content

Commit 7a2a566

Browse files
committed
Add comment about nvIndex name.
1 parent 377099a commit 7a2a566

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/tpm2.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4831,6 +4831,9 @@ TPM_RC TPM2_NV_Write(NV_Write_In* in)
48314831
TPM2_Packet_Init(ctx, &packet);
48324832

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

0 commit comments

Comments
 (0)