Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need test: Completion of CHALLENGE sets M1/M2 to null . #2118

Closed
Zhiqiang520 opened this issue Jun 12, 2023 · 5 comments · Fixed by #2127
Closed

Need test: Completion of CHALLENGE sets M1/M2 to null . #2118

Zhiqiang520 opened this issue Jun 12, 2023 · 5 comments · Fixed by #2127
Assignees
Labels
test For tests and testing infrastructure

Comments

@Zhiqiang520
Copy link
Contributor

Completion of CHALLENGE sets M1/M2 to null .

  1. Refer to the paragraph 382 Table 38 — Request ordering and message transcript computation rules for M1/M2 in DSP0274_1.2.1.pdf.
    image
  2. So I think maybe the following two libspdm_reset_message_* functions should be called before status = LIBSPDM_STATUS_SUCCESS; at the line 339.

libspdm_reset_message_b(spdm_context);
libspdm_reset_message_c(spdm_context);

spdm_context->connection_info.connection_state = LIBSPDM_CONNECTION_STATE_AUTHENTICATED;
status = LIBSPDM_STATUS_SUCCESS;
receive_done:
libspdm_release_receiver_buffer (spdm_context);
return status;

3. So I think maybe the following two libspdm_reset_message_mut_* functions should be called before return LIBSPDM_STATUS_SUCCESS; at the line 188.

libspdm_reset_message_mut_b(spdm_context);
libspdm_reset_message_mut_c(spdm_context);

ptr += signature_size;
return LIBSPDM_STATUS_SUCCESS;

4. So I think maybe the following two libspdm_reset_message_mut_* functions should be called before return LIBSPDM_STATUS_SUCCESS; at the line 222.

libspdm_reset_message_mut_b(spdm_context);
libspdm_reset_message_mut_c(spdm_context);

libspdm_set_connection_state(spdm_context,
LIBSPDM_CONNECTION_STATE_AUTHENTICATED);
*need_continue = false;
return LIBSPDM_STATUS_SUCCESS;

@steven-bellock
Copy link
Contributor

steven-bellock commented Jun 12, 2023

@jyao1 to follow up. This might be reset in something like spdm_reset_message_buffer_via_request_code, and should have been implemented in #93.

@jyao1 jyao1 assigned Zhiqiang520 and jyao1 and unassigned Zhiqiang520 Jun 13, 2023
@jyao1 jyao1 added the bug Something isn't working label Jun 13, 2023
@Zhiqiang520
Copy link
Contributor Author

@jyao1, Sorry for my misleading, Completion of CHALLENGE sets M1/M2 to null is already implemented in the current code you found.
I have tested in my forked repository, test result is pass: Zhiqiang520#10.
You can remove bug label and close this fake issue.

@jyao1 jyao1 removed the bug Something isn't working label Jun 13, 2023
@jyao1
Copy link
Member

jyao1 commented Jun 13, 2023

can you add such test to libspdm?

I would like to change it as test issue and assign to you.

@jyao1 jyao1 added the test For tests and testing infrastructure label Jun 13, 2023
@jyao1 jyao1 assigned Zhiqiang520 and unassigned jyao1 Jun 13, 2023
@jyao1 jyao1 changed the title Completion of CHALLENGE sets M1/M2 to null . Need test: Completion of CHALLENGE sets M1/M2 to null . Jun 13, 2023
Zhiqiang520 added a commit to Zhiqiang520/libspdm that referenced this issue Jun 13, 2023
Fix: DMTF#2118

Signed-off-by: Zhao, Zhiqiang <zhiqiang.zhao@intel.com>
@Zhiqiang520
Copy link
Contributor Author

I have submitted the PR to add the test cases to libspdm.

Zhiqiang520 added a commit to Zhiqiang520/libspdm that referenced this issue Jun 14, 2023
Fix: DMTF#2118

Signed-off-by: Zhao, Zhiqiang <zhiqiang.zhao@intel.com>
jyao1 pushed a commit that referenced this issue Jun 14, 2023
Fix: #2118

Signed-off-by: Zhao, Zhiqiang <zhiqiang.zhao@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test For tests and testing infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants