From 8cee5303e06d6e8a06393fafea955f0924e92f4f Mon Sep 17 00:00:00 2001 From: Steven Bellock Date: Mon, 13 Jan 2025 14:57:19 -0800 Subject: [PATCH] Algorithm bitmasks are not booleans Signed-off-by: Steven Bellock --- .../spdm_requester_lib/libspdm_req_negotiate_algorithms.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/spdm_requester_lib/libspdm_req_negotiate_algorithms.c b/library/spdm_requester_lib/libspdm_req_negotiate_algorithms.c index aa1482bb360..cfca5ae91ef 100644 --- a/library/spdm_requester_lib/libspdm_req_negotiate_algorithms.c +++ b/library/spdm_requester_lib/libspdm_req_negotiate_algorithms.c @@ -111,16 +111,16 @@ static libspdm_return_t libspdm_try_negotiate_algorithms(libspdm_context_t *spdm spdm_request->header.spdm_version = libspdm_get_connection_version (spdm_context); if (spdm_request->header.spdm_version >= SPDM_MESSAGE_VERSION_11) { /* Number of Algorithms Structure Tables based on supported algorithms */ - if (spdm_context->local_context.algorithm.dhe_named_group) { + if (spdm_context->local_context.algorithm.dhe_named_group != 0) { req_param1++; } - if (spdm_context->local_context.algorithm.aead_cipher_suite) { + if (spdm_context->local_context.algorithm.aead_cipher_suite != 0) { req_param1++; } - if (spdm_context->local_context.algorithm.req_base_asym_alg) { + if (spdm_context->local_context.algorithm.req_base_asym_alg != 0) { req_param1++; } - if (spdm_context->local_context.algorithm.key_schedule) { + if (spdm_context->local_context.algorithm.key_schedule != 0) { req_param1++; } LIBSPDM_ASSERT(req_param1 <=