DMTF / spdm-emu

BSD 3-Clause "New" or "Revised" License
30 stars 41 forks source link

Do SPDM responder have the ability to identify incoming GET_CAPABILITY parameters are invalid? #369

Open owen126315 opened 1 week ago

owen126315 commented 1 week ago

In my scenario, responder support GET_CHUNK and maximum data transfer size is 255 due to transport layer limitation. And then, a requester goes through GET_VERSION and try to send GET_CAPABILITY which without GET_CHUNK.

From responder perspective, it can predict it is likely to hit "ResponseTooLarge" error in upcoming responds (e.g. CERTIFICATE, CHALLENGE_AUTH, MEASUREMENT). Can responder early notify requester with error code that requester capabilities cannot fulfill upcoming transaction?

steven-bellock commented 6 days ago

Can responder early notify requester with error code that requester capabilities cannot fulfill upcoming transaction?

Yes, but there's not a good error code that conveys that information. Only one that really fits is Unspecified and that's not going to tell the Requester that it needs to support chunking. So you're probably better off waiting for the request and then using ResponseTooLarge.