SPDM and Examples Fixes and Unit Testing#481
Draft
aidangarske wants to merge 12 commits intowolfSSL:masterfrom
Draft
SPDM and Examples Fixes and Unit Testing#481aidangarske wants to merge 12 commits intowolfSSL:masterfrom
aidangarske wants to merge 12 commits intowolfSSL:masterfrom
Conversation
Member
aidangarske
commented
Apr 15, 2026
…ereference in wolfTPM2_LoadRsaPrivateKey_ex and wolfTPM2_LoadEccPrivateKey
…ecodeEccDer default attributes for private key imports
…l roundtrip test for TPM2_ParamEnc/Dec_CmdRequest/Response
…nit test for TPM2_HashNvPublic
…nit test for TPM2_KDFe
…unit test for wolfTPM2_ComputeName
…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
…o KeySeal template default attributes
…ation tests for CreateKeySeal_ex and LoadKeyedHashKey
11d0cdc to
e62dc84
Compare
dgarske
requested changes
Apr 16, 2026
|
|
||
| wolfTPM2_GetKeyTemplate_KeySeal(&publicTemplate, TPM_ALG_SHA256); | ||
| /* Allow password based unsealing */ | ||
| publicTemplate.objectAttributes |= TPMA_OBJECT_userWithAuth; |
Contributor
There was a problem hiding this comment.
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
| 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); |
Contributor
There was a problem hiding this comment.
This is reverting a good change we made.. The code here is the original old code.
|
|
||
| TPM2_Packet_AppendSymmetric(&packet, | ||
| (TPMT_SYM_DEF*)&in->symmetricAlg); | ||
| TPM2_Packet_AppendU16(&packet, in->symmetricAlg.algorithm); |
Contributor
There was a problem hiding this comment.
Also appears to be reverting new code.
| * See TPM 2.0 Part 1 specification (11.4.9.3) | ||
| */ | ||
| static int TPM2_KDFe( | ||
| WOLFTPM_TEST_API int TPM2_KDFe( |
Contributor
There was a problem hiding this comment.
This will collide with work already done in fwtpm branch.
| #endif | ||
| } | ||
|
|
||
| /* Test dispatch-level CmdRequest/CmdResponse nonce mapping. |
Contributor
There was a problem hiding this comment.
Many of these are already in fwtpm branch...
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.