-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements in auth handling to support Policy Password and Policy Auth Value #350
Conversation
c49ef1a
to
ad156f1
Compare
TPM2_Packet_PlaceU32(packet, tmpSz); | ||
/* Update the Auth Area total size in the command packet */ | ||
i = TPM2_Packet_PlaceU32(packet, authTotalSzPos); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(void) i;
here to prevent unused warnings when DEBUG_WOLFTPM
is not defined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed:
src/tpm2.c:265:5: warning: Value stored to 'i' is never read [deadcode.DeadStores]
i = TPM2_Packet_PlaceU32(packet, authTotalSzPos);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
src/tpm2_packet.c:394:9: warning: Value stored to 'i' is never read [deadcode.DeadStores]
i = TPM2_Packet_PlaceU32(packet, authTotalSzPos);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/tpm2_packet.c
Outdated
} | ||
/* based on position difference places calculated size at marked U32 above */ | ||
TPM2_Packet_PlaceU32(packet, tmpSz); | ||
i = TPM2_Packet_PlaceU32(packet, authTotalSzPos); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assigning i
but never using
wolftpm/tpm2_wrap.h
Outdated
\return BAD_FUNC_ARG: check the provided arguments | ||
|
||
\param dev pointer to a TPM2_DEV struct | ||
\param sessionHandle the handle of the current policy session, a session is required to use policy PCR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not listed in function declaration below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested examples and user application
TPM2_PolicyAuthValue
andTPM2_PolicyPassword
.wolfTPM2_NVReadAuthPolicy
andwolfTPM2_NVWriteAuthPolicy
.ZD 17739