Skip to content

Commit

Permalink
ESYS: Remove dead code from change auth functions.
Browse files Browse the repository at this point in the history
The check whether the esys object exists was not needed in the
sys prepare call.

Signed-off-by: Juergen Repp <[email protected]>
  • Loading branch information
JuergenReppSIT authored and AndreasFuchsTPM committed Jan 31, 2024
1 parent f77292f commit 0337d45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/tss2-esys/api/Esys_NV_ChangeAuth.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@ Esys_NV_ChangeAuth_Async(

/* Initial invocation of SAPI to prepare the command buffer with parameters */
r = Tss2_Sys_NV_ChangeAuth_Prepare(esysContext->sys,
(nvIndexNode == NULL) ? TPM2_RH_NULL
: nvIndexNode->rsrc.handle, newAuth);
nvIndexNode->rsrc.handle, newAuth);
return_state_if_error(r, _ESYS_STATE_INIT, "SAPI Prepare returned error.");

/* Calculate the cpHash Values */
Expand Down
4 changes: 1 addition & 3 deletions src/tss2-esys/api/Esys_ObjectChangeAuth.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,7 @@ Esys_ObjectChangeAuth_Async(

/* Initial invocation of SAPI to prepare the command buffer with parameters */
r = Tss2_Sys_ObjectChangeAuth_Prepare(esysContext->sys,
(objectHandleNode == NULL)
? TPM2_RH_NULL
: objectHandleNode->rsrc.handle,
objectHandleNode->rsrc.handle,
(parentHandleNode == NULL)
? TPM2_RH_NULL
: parentHandleNode->rsrc.handle,
Expand Down

0 comments on commit 0337d45

Please sign in to comment.