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

[RFC] lib: libspdm_rsp_capabilities: fixup spec conformance #2329

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/industry_standard/spdm.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ typedef struct {
#define SPDM_MESSAGE_VERSION_10 0x10
#define SPDM_MESSAGE_VERSION_11 0x11
#define SPDM_MESSAGE_VERSION_12 0x12
#define SPDM_MESSAGE_VERSION_13 0x13
#define SPDM_MESSAGE_VERSION SPDM_MESSAGE_VERSION_10

/* SPDM GET_VERSION request */
Expand Down
2 changes: 2 additions & 0 deletions library/spdm_responder_lib/libspdm_rsp_capabilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ libspdm_return_t libspdm_get_response_capabilities(libspdm_context_t *spdm_conte
SPDM_ERROR_CODE_INVALID_REQUEST, 0,
response_size, response);
}
}
if (spdm_request->header.spdm_version >= SPDM_MESSAGE_VERSION_13) {
if (((spdm_request->flags & SPDM_GET_CAPABILITIES_REQUEST_FLAGS_CHUNK_CAP) == 0) &&
(spdm_request->data_transfer_size != spdm_request->max_spdm_msg_size)) {
return libspdm_generate_error_response(spdm_context,
Expand Down
Loading