Skip to content
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/fixes to NV auth and session auth set/unset #299

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

dgarske
Copy link
Contributor

@dgarske dgarske commented Sep 15, 2023

  • 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.

@dgarske dgarske self-assigned this Sep 15, 2023
@dgarske dgarske requested a review from jpbland1 September 15, 2023 20:56
src/tpm2_wrap.c Outdated
devSession = &dev->session[index];

/* save off nonce from TPM to support continued use of session */
memcpy(&tpmSession->nonceTPM, &devSession->nonceTPM, sizeof(TPM2B_NONCE));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XMEMCPY?

* 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.
@dgarske dgarske requested a review from jpbland1 September 15, 2023 21:08
@dgarske dgarske removed their assignment Sep 15, 2023
Copy link
Contributor

@jpbland1 jpbland1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@jpbland1 jpbland1 merged commit 5497830 into wolfSSL:master Sep 15, 2023
1 check passed
dgarske added a commit to dgarske/wolfBoot that referenced this pull request Sep 15, 2023
… nonce, so the session auth can be properly set again. Requires wolfTPM PR wolfSSL/wolfTPM#299
dgarske added a commit to dgarske/wolfBoot that referenced this pull request Sep 15, 2023
… nonce, so the session auth can be properly set again. Requires wolfTPM PR wolfSSL/wolfTPM#299
danielinux pushed a commit to wolfSSL/wolfBoot that referenced this pull request Sep 18, 2023
… nonce, so the session auth can be properly set again. Requires wolfTPM PR wolfSSL/wolfTPM#299
dgarske added a commit to dgarske/wolfTPM that referenced this pull request Oct 6, 2023
@dgarske dgarske deleted the unset_sess branch December 29, 2023 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants