Skip to content

Commit 999ed70

Browse files
Wenxing-houjyao1
authored andcommitted
Fix cert verify logic in rsp_encap_get_certificate
Fix the issue: #2689 Signed-off-by: Wenxing Hou <[email protected]>
1 parent 05f59eb commit 999ed70

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

library/spdm_responder_lib/libspdm_rsp_encap_get_certificate.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Copyright Notice:
3-
* Copyright 2021-2022 DMTF. All rights reserved.
3+
* Copyright 2021-2024 DMTF. All rights reserved.
44
* License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/libspdm/blob/main/LICENSE.md
55
**/
66

@@ -201,13 +201,13 @@ libspdm_return_t libspdm_process_encap_response_certificate(
201201
if (!result) {
202202
return LIBSPDM_STATUS_VERIF_FAIL;
203203
}
204-
}
205204

206-
/*verify peer cert chain authority*/
207-
result = libspdm_verify_peer_cert_chain_buffer_authority(
208-
spdm_context, cert_chain_buffer, cert_chain_buffer_size, NULL, NULL);
209-
if (!result) {
210-
status = LIBSPDM_STATUS_VERIF_NO_AUTHORITY;
205+
/*verify peer cert chain authority*/
206+
result = libspdm_verify_peer_cert_chain_buffer_authority(
207+
spdm_context, cert_chain_buffer, cert_chain_buffer_size, NULL, NULL);
208+
if (!result) {
209+
status = LIBSPDM_STATUS_VERIF_NO_AUTHORITY;
210+
}
211211
}
212212

213213
spdm_context->connection_info.peer_used_cert_chain_slot_id =

0 commit comments

Comments
 (0)