Skip to content

Commit

Permalink
Update error code for unsupported RequesterInfo in CSR requests
Browse files Browse the repository at this point in the history
Fix #2893

Signed-off-by: Shital Jumbad <[email protected]>
  • Loading branch information
ShitalJumbad authored and steven-bellock committed Nov 22, 2024
1 parent ca4854b commit 98ef964
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library/spdm_responder_lib/libspdm_rsp_csr.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ libspdm_return_t libspdm_get_response_csr(libspdm_context_t *spdm_context,
} else {
return libspdm_generate_error_response(
spdm_context,
SPDM_ERROR_CODE_UNEXPECTED_REQUEST, 0,
SPDM_ERROR_CODE_INVALID_REQUEST, 0,
response_size, response);
}
}
Expand Down
4 changes: 2 additions & 2 deletions unit_test/test_spdm_responder/csr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1767,7 +1767,7 @@ void libspdm_test_responder_csr_case15(void **state)
assert_int_equal(spdm_response->header.request_response_code,
SPDM_ERROR);
assert_int_equal(spdm_response->header.param1,
SPDM_ERROR_CODE_UNEXPECTED_REQUEST);
SPDM_ERROR_CODE_INVALID_REQUEST);
assert_int_equal(spdm_response->header.param2, 0);

/*matched csr_tracking_tag without overwrite*/
Expand Down Expand Up @@ -1857,7 +1857,7 @@ void libspdm_test_responder_csr_case15(void **state)
assert_int_equal(spdm_response->header.request_response_code,
SPDM_ERROR);
assert_int_equal(spdm_response->header.param1,
SPDM_ERROR_CODE_UNEXPECTED_REQUEST);
SPDM_ERROR_CODE_INVALID_REQUEST);
assert_int_equal(spdm_response->header.param2, 0);

/*csr_tracking_tag 0 and overwrite*/
Expand Down

0 comments on commit 98ef964

Please sign in to comment.