Skip to content
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

spdm1.3: rsp_csr: handling csr_tracking_tag = 0 case #2549

Closed
twilfredo opened this issue Jan 30, 2024 · 2 comments
Closed

spdm1.3: rsp_csr: handling csr_tracking_tag = 0 case #2549

twilfredo opened this issue Jan 30, 2024 · 2 comments
Labels
question Further information is requested

Comments

@twilfredo
Copy link
Contributor

From the 1.3 SPDM spec:

[758] If the device requires a reset to complete the GET_CSR request, the device shall respond with an ERROR message of
ErrorCode=ResetRequired with Bit[2:0] of the Error Data field set to a Responder-assigned CSRTrackingTag
in the range of 1 to 7 , inclusive

This implies that CSRTrackingTag takes on values [1, 7] as set by the responder. So in a case where there is a request with this field (param2) set to 0, would imply (?) that the requester is not following up on a previous CSR (?).

[758] ... the Requester sends a GET_CSR request with Bit[5:3] in Param2 set to the
CSRTrackingTag that the Responder provided in the corresponding ERROR response, which signals to the
Responder to send the CSR response associated with the previous request

  1. Is this understanding correct?
  2. If so, in the following case,

result = libspdm_gen_csr_ex(spdm_context->connection_info.algorithm.base_hash_algo,

Should we not invoke libspdm_gen_csr() instead of libspdm_gen_csr_ex() if csr_tracking_tag == 0 ? So we can process the csr generation normally without depending on an implementation of libspdm_gen_csr_ex()?

@steven-bellock
Copy link
Contributor

Is this understanding correct?

Yes.

Should we not invoke libspdm_gen_csr() instead of libspdm_gen_csr_ex() if csr_tracking_tag == 0 ?

No. How would libspdm_gen_csr return a tracking tag to libspdm if one is needed?

However there is a bug in libspdm_gen_csr_ex. There is no parameter for the KeyPairID field. I'll file a separate issue for that.

@twilfredo
Copy link
Contributor Author

Is this understanding correct?

Yes.

Should we not invoke libspdm_gen_csr() instead of libspdm_gen_csr_ex() if csr_tracking_tag == 0 ?

No. How would libspdm_gen_csr return a tracking tag to libspdm if one is needed?

Okay that makes sense, I assume that is why the default behavior for version 1.3 is to return an error when LIBSPDM_ENABLE_CAPABILITY_CSR_CAP_EX disabled, to avoid this ambiguity? Thanks for clearing that up :)

However there is a bug in libspdm_gen_csr_ex. There is no parameter for the KeyPairID field. I'll file a separate issue for that.

@steven-bellock steven-bellock added the question Further information is requested label Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants