-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why connection_state check is prior to version check at DIGESTS message #2213
Comments
I don't think there is a reason. But thinking about appropriate error codes.
Regardless of the order of priority in 2, the Responder should be consistent throughout all its message handling. |
Thank @steven-bellock
|
I'm not saying it does that right now, I'm just saying it should do that, as I think that's the correct error response. @jyao1 or @Zhiqiang520 may have a different opinion. |
No special reason. If libspdm implements in a different way, you can ask the same question, e.g. "why connection_state check is after the version check". My understanding is that: If a spec does not describe the order of checking, then any checking order should be allowed to return error immediately. Only after all checks pass, then the right response is returned. |
Thanks @jyao1
So I expect libspdm returns ErroCode with RequestResynch not VersionMismatch at libspdm_get_response_digests (if the Requester has not sent GET_VERSION) |
I believe chapter 17 talks about the order of SPDM message in the transport level. It is not about the order of error checking. |
According to DSP0274,
If requester sends However, if the version is checked first as shown in the code below, libspdm/library/spdm_responder_lib/libspdm_rsp_digests.c Lines 33 to 56 in 1c34043
Excluding |
seems to be at odds with the definition of
I'll file an issue against the specification. |
I wanna know the reason why connection_state check is prior to version check at DIGESTS message
Case)
when responder receives GET_DIGESTS message before responder receive GET_VERSION message
I think rsponder returns SPDM_ERROR_CODE_UNEXPECTED_REQUEST(line 51) instead of SPDM_ERROR_CODE_VERSION_MISMATCH(line 33)
So I think that responder should check connection_state first.
https://github.com/DMTF/libspdm/blob/1c34043d8142ed285ead67eb07d4aa09c8d0a8d8/library/spdm_responder_lib/libspdm_rsp_digests.c#L33C1-L55C76
The text was updated successfully, but these errors were encountered: