From 5b011711f983ba01596fb444211a36e0eddf6621 Mon Sep 17 00:00:00 2001 From: Jiewen Yao Date: Wed, 20 Dec 2023 13:44:16 +0800 Subject: [PATCH] Fix MAX_MANAGED_BUFFER_TH_SIZE Hash of cert should be appended, not cert data. Signed-off-by: Jiewen Yao --- spdmlib/src/common/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spdmlib/src/common/mod.rs b/spdmlib/src/common/mod.rs index 9cf17301..2b5f39c3 100644 --- a/spdmlib/src/common/mod.rs +++ b/spdmlib/src/common/mod.rs @@ -1171,9 +1171,9 @@ const MAX_MANAGED_BUFFER_M1M2_SIZE: usize = MAX_MANAGED_BUFFER_A_SIZE + MAX_MANAGED_BUFFER_B_SIZE + MAX_MANAGED_BUFFER_C_SIZE; const MAX_MANAGED_BUFFER_L1L2_SIZE: usize = MAX_MANAGED_BUFFER_A_SIZE + MAX_MANAGED_BUFFER_M_SIZE; const MAX_MANAGED_BUFFER_TH_SIZE: usize = MAX_MANAGED_BUFFER_A_SIZE - + config::MAX_SPDM_CERT_CHAIN_DATA_SIZE + + SPDM_MAX_HASH_SIZE + MAX_MANAGED_BUFFER_K_SIZE - + config::MAX_SPDM_CERT_CHAIN_DATA_SIZE + + SPDM_MAX_HASH_SIZE + MAX_MANAGED_BUFFER_F_SIZE; const SPDM_VERSION_1_2_SIGNING_PREFIX_CONTEXT_SIZE: usize = 64;