Skip to content

Conversation

@dgarske
Copy link
Contributor

@dgarske dgarske commented Jun 26, 2025

Example for HMAC with persistent key. ZD 20109.

@dgarske dgarske self-assigned this Jun 26, 2025
@dgarske dgarske requested a review from embhorn June 27, 2025 14:46
@dgarske dgarske assigned wolfSSL-Bot and embhorn and unassigned dgarske Jun 27, 2025
@embhorn embhorn requested a review from Copilot July 1, 2025 17:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a persistent-key HMAC example and integrates it into the build and test scripts, plus minor behavior tweaks in the wrapper.

  • Capture usageAuth only when provided in wolfTPM2_HmacStart
  • New hmac example source and build inclusion
  • Enhanced run script to execute HMAC tests

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/tpm2_wrap.c Guarded auth copy on usageAuth != NULL
examples/wrap/wrap_test.h Declared TPM2_Wrapper_Hmac prototypes
examples/wrap/include.am Added hmac example to build targets
examples/wrap/hmac.c New HMAC example implementation
examples/tpm_test.h Defined TPM2_DEMO_HMAC_KEY_HANDLE
examples/run_examples.sh Added HMAC test invocations in CI script
Comments suppressed due to low confidence (1)

examples/run_examples.sh:141

  • There's no test for the -keep option. Consider adding a ./examples/wrap/hmac -keep invocation to ensure the persistent-key behavior is covered in CI.
./examples/wrap/hmac >> $TPMPWD/run.out 2>&1

Copy link
Member

@embhorn embhorn 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 and tests successfully

@embhorn embhorn merged commit 22b324f into wolfSSL:master Jul 1, 2025
4 checks passed
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