diff --git a/spdm_dump/spdm/spdm_dump_spdm.c b/spdm_dump/spdm/spdm_dump_spdm.c index ef59c1e..f59ec59 100644 --- a/spdm_dump/spdm/spdm_dump_spdm.c +++ b/spdm_dump/spdm/spdm_dump_spdm.c @@ -1834,7 +1834,7 @@ void dump_spdm_key_exchange(const void *buffer, size_t buffer_size) return; } - m_cached_session_id = spdm_request->req_session_id << 16; + m_cached_session_id = spdm_request->req_session_id; memcpy(m_spdm_last_message_buffer, buffer, message_size); m_spdm_last_message_buffer_size = message_size; } @@ -1966,7 +1966,7 @@ void dump_spdm_key_exchange_rsp(const void *buffer, size_t buffer_size) } m_cached_session_id = - m_cached_session_id | spdm_response->rsp_session_id; + m_cached_session_id | (spdm_response->rsp_session_id << 16); /* double check if current is occupied*/ if (libspdm_get_session_info_via_session_id(m_spdm_context, m_cached_session_id) != NULL) { @@ -2256,7 +2256,7 @@ void dump_spdm_psk_exchange(const void *buffer, size_t buffer_size) printf("\n"); - m_cached_session_id = spdm_request->req_session_id << 16; + m_cached_session_id = spdm_request->req_session_id; memcpy(m_spdm_last_message_buffer, buffer, message_size); m_spdm_last_message_buffer_size = message_size; } @@ -2332,7 +2332,7 @@ void dump_spdm_psk_exchange_rsp(const void *buffer, size_t buffer_size) printf("\n"); m_cached_session_id = - m_cached_session_id | spdm_response->rsp_session_id; + m_cached_session_id | (spdm_response->rsp_session_id << 16); /* double check if current is occupied*/ if (libspdm_get_session_info_via_session_id(m_spdm_context, m_cached_session_id) != NULL) {