DMTF / spdm-emu

BSD 3-Clause "New" or "Revised" License
31 stars 42 forks source link

Enquiry for ERROR Param 1 & 2 before GET_CAPABILITIES #335

Open owen126315 opened 8 months ago

owen126315 commented 8 months ago

The original order of SPDM emu:

  1. GET_VERSION
  2. GET_CAPABILITIES
  3. NEGOTIATE_ALGORITHMS
  4. GET_DIGESTS
  5. GET_CERTIFICATE
  6. CHALLENGE
  7. GET_MEASUREMENTS

I tried to shuffle the SPDM requests order as below:

  1. GET_MEASUREMENTS
  2. CHALLENGE
  3. GET_CERTIFICATE
  4. GET_DIGESTS
  5. NEGOTIATE_ALGORITHMS
  6. GET_CAPABILITIES
  7. GET_VERSION

I expected to have ERROR(UnexpectedRequest), but turns out most of the responds were ERROR(VersionMismatch).

Is that a bug? Or just a misunderstanding of the SPDM spec?

steven-bellock commented 8 months ago

See https://github.com/DMTF/libspdm/issues/2213. Note that the SPDM specification has normative language for error codes for only a few conditions / scenarios. The rest it leaves up to the endpoint implementer.