File tree 2 files changed +5
-12
lines changed
2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change 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
@@ -538,10 +538,6 @@ static libspdm_return_t libspdm_try_send_receive_key_exchange(
538
538
spdm_context , true,
539
539
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_MUT_AUTH_CAP ,
540
540
SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MUT_AUTH_CAP );
541
- const bool encap_cap_both = libspdm_is_capabilities_flag_supported (
542
- spdm_context , true,
543
- SPDM_GET_CAPABILITIES_REQUEST_FLAGS_ENCAP_CAP ,
544
- SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_ENCAP_CAP );
545
541
const bool cert_cap = libspdm_is_capabilities_flag_supported (
546
542
spdm_context , true,
547
543
SPDM_GET_CAPABILITIES_REQUEST_FLAGS_CERT_CAP ,
@@ -600,8 +596,8 @@ static libspdm_return_t libspdm_try_send_receive_key_exchange(
600
596
status = LIBSPDM_STATUS_INVALID_MSG_FIELD ;
601
597
goto receive_done ;
602
598
}
603
- /* Encapsulated flow requires ENCAP_CAP for both endpoints. */
604
- if (!encap_cap_both ) {
599
+ /* Encapsulated flow requires support for encapsulated messages by both endpoints. */
600
+ if (!libspdm_is_encap_supported ( spdm_context ) ) {
605
601
libspdm_secured_message_dhe_free (
606
602
spdm_context -> connection_info .algorithm .dhe_named_group , dhe_context );
607
603
status = LIBSPDM_STATUS_INVALID_MSG_FIELD ;
Original file line number Diff line number Diff line change 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
@@ -297,10 +297,7 @@ libspdm_return_t libspdm_get_response_encapsulated_response_ack(
297
297
response_size , response );
298
298
}
299
299
300
- if (!libspdm_is_capabilities_flag_supported (
301
- spdm_context , false,
302
- SPDM_GET_CAPABILITIES_REQUEST_FLAGS_ENCAP_CAP ,
303
- SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_ENCAP_CAP )) {
300
+ if (!libspdm_is_encap_supported (spdm_context )) {
304
301
return libspdm_generate_error_response (
305
302
spdm_context , SPDM_ERROR_CODE_UNSUPPORTED_REQUEST ,
306
303
SPDM_DELIVER_ENCAPSULATED_RESPONSE , response_size , response );
You can’t perform that action at this time.
0 commit comments