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

Update Test 2.4 #140

Closed
mcsmonk opened this issue Dec 24, 2024 · 2 comments · Fixed by #142
Closed

Update Test 2.4 #140

mcsmonk opened this issue Dec 24, 2024 · 2 comments · Fixed by #142
Assignees
Labels
bug Something isn't working

Comments

@mcsmonk
Copy link
Member

mcsmonk commented Dec 24, 2024

Currently, the first three test cases for 2.4 in the DOC are invalid GET_CAPABILITIES requests with the following flags:

index NegotiatedVersion Flags
0 1.1+ CERT_CAP|CHAL_CAP| MUT_AUTH_CAP|KEY_EX_CAP|PSK_CAP|ENCAP_CAP|HBEAT_CAP|KEY_UPD_CAP
1 1.1+ CERT_CAP|CHAL_CAP|ENCRYPT_CAP|MAC_CAP|MUT_AUTH_CAP| ENCAP_CAP|HBEAT_CAP|KEY_UPD_CAP
2 1.1 CERT_CAP|CHAL_CAP|ENCRYPT_CAP|MAC_CAP|MUT_AUTH_CAP|KEY_EX_CAP|PSK_CAP| HBEAT_CAP|KEY_UPD_CAP
  1. SPDM_GET_CAPABILITIES_REQUEST_FLAGS_PSK_CAP_REQUESTER | should be added in index 0 and 2 to sync with the documentation.

uint32_t invalid_flags_v11[] = {
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_CERT_CAP |
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_CHAL_CAP |
/* SPDM_GET_CAPABILITIES_REQUEST_FLAGS_ENCRYPT_CAP |
* SPDM_GET_CAPABILITIES_REQUEST_FLAGS_MAC_CAP |*/
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_MUT_AUTH_CAP |
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_KEY_EX_CAP |
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_ENCAP_CAP |
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_HBEAT_CAP |
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_KEY_UPD_CAP,
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_CERT_CAP |
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_CHAL_CAP |
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_ENCRYPT_CAP |
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_MAC_CAP |
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_MUT_AUTH_CAP |
/* SPDM_GET_CAPABILITIES_REQUEST_FLAGS_KEY_EX_CAP | */
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_ENCAP_CAP |
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_HBEAT_CAP |
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_KEY_UPD_CAP,
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_CERT_CAP |
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_CHAL_CAP |
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_ENCRYPT_CAP |
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_MAC_CAP |
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_MUT_AUTH_CAP |
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_KEY_EX_CAP |
/* SPDM_GET_CAPABILITIES_REQUEST_FLAGS_ENCAP_CAP | */
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_HBEAT_CAP |
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_KEY_UPD_CAP,

  1. The test case for the first index is a valid request in the current libspdm.

  2. Because CAPABILITIES response message is received in case of the first index test, current test structure immediately fail because both host and device have a AfterCapability state

@steven-bellock
Copy link
Contributor

@mcsmonk DMTF/libspdm#2921 requested that CAPABILITIES not fail for the DSP0277 MAC_CAP check. That check was deferred to when KEY_EXCHANGE was initiated. However I forgot to enforce

KEY_EX_CAP - If set, Requester shall support KEY_EXCHANGE request message. If set, ENCRYPT_CAP or MAC_CAP shall be set.

when checking capabilities. So that check needs to be in libspdm.

@steven-bellock
Copy link
Contributor

@jyao1 will fix the documentation issue. I will fix libspdm in DMTF/libspdm#2944.

@jyao1 jyao1 mentioned this issue Jan 7, 2025
@jyao1 jyao1 closed this as completed in #142 Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants