Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

change visiblity of constants to pub. #184

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions spdmlib/src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1151,34 +1151,35 @@ pub struct SpdmNegotiateInfo {
pub rsp_max_spdm_msg_size_sel: u32, // spdm 1.2
}

const MAX_MANAGED_BUFFER_A_SIZE: usize = 150 + 2 * MAX_SPDM_VERSION_COUNT;
const MAX_MANAGED_BUFFER_B_SIZE: usize =
pub const MAX_MANAGED_BUFFER_A_SIZE: usize = 150 + 2 * MAX_SPDM_VERSION_COUNT;
pub const MAX_MANAGED_BUFFER_B_SIZE: usize =
24 + SPDM_MAX_HASH_SIZE * SPDM_MAX_SLOT_NUMBER + config::MAX_SPDM_CERT_CHAIN_DATA_SIZE;
const MAX_MANAGED_BUFFER_C_SIZE: usize =
pub const MAX_MANAGED_BUFFER_C_SIZE: usize =
78 + SPDM_MAX_HASH_SIZE * 2 + SPDM_MAX_ASYM_KEY_SIZE + MAX_SPDM_OPAQUE_SIZE;
const MAX_MANAGED_BUFFER_M_SIZE: usize = 47
pub const MAX_MANAGED_BUFFER_M_SIZE: usize = 47
+ SPDM_NONCE_SIZE
+ config::MAX_SPDM_MEASUREMENT_RECORD_SIZE
+ SPDM_MAX_ASYM_KEY_SIZE
+ MAX_SPDM_OPAQUE_SIZE;
const MAX_MANAGED_BUFFER_K_SIZE: usize = 84
pub const MAX_MANAGED_BUFFER_K_SIZE: usize = 84
+ SPDM_MAX_DHE_KEY_SIZE * 2
+ SPDM_MAX_HASH_SIZE * 2
+ SPDM_MAX_ASYM_KEY_SIZE
+ MAX_SPDM_OPAQUE_SIZE * 2;
const MAX_MANAGED_BUFFER_F_SIZE: usize = 8 + SPDM_MAX_HASH_SIZE * 2 + SPDM_MAX_ASYM_KEY_SIZE;
const MAX_MANAGED_BUFFER_M1M2_SIZE: usize =
pub const MAX_MANAGED_BUFFER_F_SIZE: usize = 8 + SPDM_MAX_HASH_SIZE * 2 + SPDM_MAX_ASYM_KEY_SIZE;
pub 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
pub const MAX_MANAGED_BUFFER_L1L2_SIZE: usize =
MAX_MANAGED_BUFFER_A_SIZE + MAX_MANAGED_BUFFER_M_SIZE;
pub const MAX_MANAGED_BUFFER_TH_SIZE: usize = MAX_MANAGED_BUFFER_A_SIZE
+ config::MAX_SPDM_CERT_CHAIN_DATA_SIZE
+ MAX_MANAGED_BUFFER_K_SIZE
+ config::MAX_SPDM_CERT_CHAIN_DATA_SIZE
+ MAX_MANAGED_BUFFER_F_SIZE;

const SPDM_VERSION_1_2_SIGNING_PREFIX_CONTEXT_SIZE: usize = 64;
const SPDM_VERSION_1_2_SIGN_CONTEXT_SIZE: usize = 36;
const MAX_MANAGED_BUFFER_12SIGN_SIZE: usize = SPDM_VERSION_1_2_SIGNING_PREFIX_CONTEXT_SIZE
pub const SPDM_VERSION_1_2_SIGNING_PREFIX_CONTEXT_SIZE: usize = 64;
pub const SPDM_VERSION_1_2_SIGN_CONTEXT_SIZE: usize = 36;
pub const MAX_MANAGED_BUFFER_12SIGN_SIZE: usize = SPDM_VERSION_1_2_SIGNING_PREFIX_CONTEXT_SIZE
+ SPDM_VERSION_1_2_SIGN_CONTEXT_SIZE
+ SPDM_MAX_HASH_SIZE;

Expand Down
Loading