Skip to content

Commit

Permalink
Change session_id generate
Browse files Browse the repository at this point in the history
Fix the issue: DMTF#63

Signed-off-by: Wenxing Hou <[email protected]>
  • Loading branch information
Wenxing-hou committed Dec 13, 2022
1 parent 81ff78e commit 2cbb9eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spdm_dump/spdm/spdm_dump_spdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 2cbb9eb

Please sign in to comment.