From 87259221cc96c7c631d330edd52524ed4db0ff93 Mon Sep 17 00:00:00 2001 From: Xiaohanjlll Date: Wed, 24 Jan 2024 13:34:10 +0800 Subject: [PATCH] fix SPDM 1.3 MEL algorithm negotiate Signed-off-by: Xiaohanjlll --- .../spdm_requester_lib/libspdm_req_negotiate_algorithms.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/spdm_requester_lib/libspdm_req_negotiate_algorithms.c b/library/spdm_requester_lib/libspdm_req_negotiate_algorithms.c index cf46793b5d2..0bdc1ff8de8 100644 --- a/library/spdm_requester_lib/libspdm_req_negotiate_algorithms.c +++ b/library/spdm_requester_lib/libspdm_req_negotiate_algorithms.c @@ -580,6 +580,11 @@ static libspdm_return_t libspdm_try_negotiate_algorithms(libspdm_context_t *spdm status = LIBSPDM_STATUS_INVALID_MSG_FIELD; goto receive_done; } + } else { + if (spdm_context->connection_info.algorithm.mel_spec != 0) { + status = LIBSPDM_STATUS_INVALID_MSG_FIELD; + goto receive_done; + } } } }