From 98ef964e1e9a0c39c7efb67143d3a13a819432e0 Mon Sep 17 00:00:00 2001 From: Shital Jumbad Date: Mon, 18 Nov 2024 14:07:14 -0800 Subject: [PATCH] Update error code for unsupported RequesterInfo in CSR requests Fix #2893 Signed-off-by: Shital Jumbad --- library/spdm_responder_lib/libspdm_rsp_csr.c | 2 +- unit_test/test_spdm_responder/csr.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/spdm_responder_lib/libspdm_rsp_csr.c b/library/spdm_responder_lib/libspdm_rsp_csr.c index d4ccda94cd4..42c6f9202ec 100644 --- a/library/spdm_responder_lib/libspdm_rsp_csr.c +++ b/library/spdm_responder_lib/libspdm_rsp_csr.c @@ -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); } } diff --git a/unit_test/test_spdm_responder/csr.c b/unit_test/test_spdm_responder/csr.c index 4453bb24dec..4a6c73e6da4 100644 --- a/unit_test/test_spdm_responder/csr.c +++ b/unit_test/test_spdm_responder/csr.c @@ -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*/ @@ -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*/