[RFC] lib: libspdm_rsp_capabilities: fixup spec conformance #2329
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.
Overview [RFC]
When chunking is not supported, MaxSPDMmsgSize shall equal DataTransferSize in a GET_CAPABILITIES request. However, this is only specified in the SPDM 1.3 spec, but libspdm enforces it for >= 1.2 spec.
This change
A requester implementing 1.2 >= version < 1.3 may not conform to this as it is not specified in the 1.2 or 1.2.1 specification for a GET_CAPABILITIES request. So only enforce this if the version used is 1.3.
Context
I was testing the ongoing effort for the Linux Kernel SPDM requester implementation. When it's sending a get_capabilities request using 1.2, without chunking, the kernel implementation does not set MaxSPDMmsgSize=DataTransferSize. So such a request would be responded to with an SPDM_ERROR (0x7F) by a libspdm based responder.
Log:
TODO
Is there a more appropriate solution to this?