Skip to content

SPDM and Examples Fixes and Unit Testing#481

Draft
aidangarske wants to merge 12 commits intowolfSSL:masterfrom
aidangarske:fenrir-fixes-7
Draft

SPDM and Examples Fixes and Unit Testing#481
aidangarske wants to merge 12 commits intowolfSSL:masterfrom
aidangarske:fenrir-fixes-7

Conversation

@aidangarske
Copy link
Copy Markdown
Member

F-2975, F-2976, F-2977, F-2978, F-2981, F-2982, F-2983, F-2984, F-2985, F-2986, F-2987, F-2988,
F-2989, F-2990, F-2991, F-2992

@aidangarske aidangarske self-assigned this Apr 15, 2026
@aidangarske aidangarske requested review from Copilot and removed request for Copilot April 15, 2026 19:33
…ereference in wolfTPM2_LoadRsaPrivateKey_ex and wolfTPM2_LoadEccPrivateKey
…ecodeEccDer default attributes for private key imports
…l roundtrip test for TPM2_ParamEnc/Dec_CmdRequest/Response
…me serialization missing count field, RSA RSAES spurious hashAlg, and TPM2_Sign ECDAA count
…sensitive stack buffers in SPDM PSK and TCG functions
…assignment on success in wolfTPM2_SetIdentityAuth
…ation tests for CreateKeySeal_ex and LoadKeyedHashKey
Copilot AI review requested due to automatic review settings April 16, 2026 17:03
@aidangarske aidangarske review requested due to automatic review settings April 16, 2026 17:03
@aidangarske aidangarske marked this pull request as ready for review April 16, 2026 17:09
@aidangarske aidangarske requested review from Copilot and dgarske and removed request for Copilot April 16, 2026 17:09
Comment thread examples/seal/seal.c

wolfTPM2_GetKeyTemplate_KeySeal(&publicTemplate, TPM_ALG_SHA256);
/* Allow password based unsealing */
publicTemplate.objectAttributes |= TPMA_OBJECT_userWithAuth;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was here on purpose to allow password auth unsealing for the policy as well. This example may not require it. This came up in wolfBoot during expected failure testing so we have it like... https://github.com/wolfSSL/wolfBoot/blob/master/src/tpm.c#L887

Comment thread src/tpm2.c
rc = TPM2_GetName(ctx, handleValue2, info->inHandleCnt, 1, &name2);
if (rc == TPM_RC_SUCCESS)
rc = TPM2_GetName(ctx, handleValue3, info->inHandleCnt, 2, &name3);
rc = TPM2_GetName(ctx, handleValue1, info->inHandleCnt, 0, &name1);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is reverting a good change we made.. The code here is the original old code.

Comment thread src/tpm2.c

TPM2_Packet_AppendSymmetric(&packet,
(TPMT_SYM_DEF*)&in->symmetricAlg);
TPM2_Packet_AppendU16(&packet, in->symmetricAlg.algorithm);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also appears to be reverting new code.

Comment thread src/tpm2_wrap.c
* See TPM 2.0 Part 1 specification (11.4.9.3)
*/
static int TPM2_KDFe(
WOLFTPM_TEST_API int TPM2_KDFe(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This will collide with work already done in fwtpm branch.

Comment thread tests/unit_tests.c
#endif
}

/* Test dispatch-level CmdRequest/CmdResponse nonce mapping.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Many of these are already in fwtpm branch...

@aidangarske aidangarske marked this pull request as draft April 16, 2026 18:48
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.

2 participants