Add Initial SPDM AC v184 Command Interface Support #448
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.
Description
This PR adds initial SPDM (Security Protocol and Data Model) support for TPM 2.0 per TCG TPM 2.0 Library Specification v1.84 and the TCG simulator reference specs and code. Including policy commands and session information capabilities.
Overview
The implementation provides SPDM functionality to support secure communication channels between host and TPM int the future, focusing on the supported commands from the TCG simulator for now.
Main Functions Created
Core API Functions
wolfTPM2_PolicyTransportSPDM() - Add SPDM transport policy to session
wolfTPM2_GetCapability_SPDMSessionInfo() - Get active SPDM session information
wolfTPM2_GetACHandles() - Discover Authenticated Controller handles
Internal Functions
Key Implementation Details
Structures Added
Marshaling Support
Custom marshaling/unmarshaling functions implemented for:
TPM2B_NAMEstructures (used in SPDM session info)TPMS_SPDM_SESSION_INFOstructuresTPML_SPDM_SESSION_INFOlistsTesting
All functionality tested with TCG TPM simulator and example code:
tcg_spdmexample with full test suiteAdded test script (
examples/spdm/test_tcg_spdm.sh) with selective testing via command-line options.Updated
.github/workflows/make-test-swtpm.ymlwith--enable-spdmflag.TODO: