DMTF / libspdm

BSD 3-Clause "New" or "Revised" License
90 stars 94 forks source link

Fix acquiring Session ID in Vendor Defined Response #2702

Closed m-milinkovic closed 1 month ago

m-milinkovic commented 2 months ago

Hi @steven-bellock, I believe we need to fix acquiring Session ID prior to #2694.

Please check the call of spdm_context->get_response_func (i.e., line 67). session_info is not a pointer, it's an array. Therefore, Session ID is correct only if Session Info is stored at index zero.

m-milinkovic commented 2 months ago

Also... Line 67 is always incorrect in case if secure session is not established - a "valid" pointer is passed to spdm_context->get_response_func instead of NULL.