-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements/fixes to NV auth and session auth set/unset:
* Fix bug with NV name after first write (only appears when using HMAC session). * Add new API `wolfTPM2_UnsetAuthSession` to unset auth index for a session and save off the nonce from the TPM. This allows auth to be unset/set again with the same session. * Cleanup in the NV API's for unsetting of the auth to be handled by caller, not in API.
- Loading branch information
Showing
9 changed files
with
67 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -367,6 +367,25 @@ WOLFTPM_API int wolfTPM2_GetCapabilities(WOLFTPM2_DEV* dev, WOLFTPM2_CAPS* caps) | |
*/ | ||
WOLFTPM_API int wolfTPM2_UnsetAuth(WOLFTPM2_DEV* dev, int index); | ||
|
||
/*! | ||
\ingroup wolfTPM2_Wrappers | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dgarske
Author
Contributor
|
||
\brief Clears one of the TPM Authorization session slots, pointed by its index | ||
number and saves the nonce from the TPM so the session can continue to be used | ||
again with wolfTPM2_SetAuthSession | ||
\return TPM_RC_SUCCESS: successful | ||
\return TPM_RC_FAILURE: unable to get lock on the TPM2 Context | ||
\return BAD_FUNC_ARG: check the provided arguments | ||
\param dev pointer to a TPM2_DEV struct | ||
\param index integer value, specifying the TPM Authorization slot, between zero and three | ||
\param session pointer to a WOLFTPM2_SESSION struct used with wolfTPM2_StartSession and wolfTPM2_SetAuthSession | ||
\sa wolfTPM2_StartSession | ||
\sa wolfTPM2_SetAuthSession | ||
*/ | ||
WOLFTPM_API int wolfTPM2_UnsetAuthSession(WOLFTPM2_DEV* dev, int index, WOLFTPM2_SESSION* session); | ||
|
||
/*! | ||
\ingroup wolfTPM2_Wrappers | ||
\brief Sets a TPM Authorization slot using the provided index, session handle, attributes and auth | ||
|
src/tpm2_wrap.c