1
1
/**
2
2
* Copyright Notice:
3
- * Copyright 2021-2024 DMTF. All rights reserved.
3
+ * Copyright 2021-2025 DMTF. All rights reserved.
4
4
* License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/libspdm/blob/main/LICENSE.md
5
5
**/
6
6
@@ -58,7 +58,7 @@ bool libspdm_verify_finish_rsp_hmac(libspdm_context_t *spdm_context,
58
58
return false;
59
59
}
60
60
61
- if (session_info -> mut_auth_requested ) {
61
+ if (session_info -> mut_auth_requested != 0 ) {
62
62
slot_id = spdm_context -> connection_info .local_used_cert_chain_slot_id ;
63
63
LIBSPDM_ASSERT ((slot_id < SPDM_MAX_SLOT_COUNT ) || (slot_id == 0xFF ));
64
64
if (slot_id == 0xFF ) {
@@ -153,7 +153,7 @@ bool libspdm_generate_finish_req_hmac(libspdm_context_t *spdm_context,
153
153
return false;
154
154
}
155
155
156
- if (session_info -> mut_auth_requested ) {
156
+ if (session_info -> mut_auth_requested != 0 ) {
157
157
slot_id = spdm_context -> connection_info .local_used_cert_chain_slot_id ;
158
158
LIBSPDM_ASSERT ((slot_id < SPDM_MAX_SLOT_COUNT ) || (slot_id == 0xFF ));
159
159
if (slot_id == 0xFF ) {
@@ -419,7 +419,7 @@ static libspdm_return_t libspdm_try_send_receive_finish(libspdm_context_t *spdm_
419
419
spdm_request -> header .param2 = 0 ;
420
420
signature_size = 0 ;
421
421
#if LIBSPDM_ENABLE_CAPABILITY_MUT_AUTH_CAP
422
- if (session_info -> mut_auth_requested ) {
422
+ if (session_info -> mut_auth_requested != 0 ) {
423
423
spdm_request -> header .param1 = SPDM_FINISH_REQUEST_ATTRIBUTES_SIGNATURE_INCLUDED ;
424
424
spdm_request -> header .param2 = req_slot_id_param ;
425
425
signature_size = libspdm_get_req_asym_signature_size (
@@ -428,7 +428,7 @@ static libspdm_return_t libspdm_try_send_receive_finish(libspdm_context_t *spdm_
428
428
#endif
429
429
430
430
spdm_context -> connection_info .local_used_cert_chain_slot_id = req_slot_id_param ;
431
- if (session_info -> mut_auth_requested && (req_slot_id_param != 0xFF )) {
431
+ if (( session_info -> mut_auth_requested != 0 ) && (req_slot_id_param != 0xFF )) {
432
432
LIBSPDM_ASSERT (req_slot_id_param < SPDM_MAX_SLOT_COUNT );
433
433
spdm_context -> connection_info .local_used_cert_chain_buffer =
434
434
spdm_context -> local_context .local_cert_chain_provision [req_slot_id_param ];
@@ -449,7 +449,7 @@ static libspdm_return_t libspdm_try_send_receive_finish(libspdm_context_t *spdm_
449
449
goto error ;
450
450
}
451
451
#if LIBSPDM_ENABLE_CAPABILITY_MUT_AUTH_CAP
452
- if (session_info -> mut_auth_requested ) {
452
+ if (session_info -> mut_auth_requested != 0 ) {
453
453
result = libspdm_generate_finish_req_signature (spdm_context , session_info , ptr );
454
454
if (!result ) {
455
455
libspdm_release_sender_buffer (spdm_context );
0 commit comments