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

Commit

Permalink
replace hardcode with MAX_SUPPORTED_ALG_STRUCTURE_COUNT.
Browse files Browse the repository at this point in the history
Signed-off-by: Yang, Longlong <[email protected]>
  • Loading branch information
longlongyang authored and jyao1 committed Dec 11, 2023
1 parent 41fe503 commit 2982c94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spdmlib/src/message/algorithm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ use codec::{Codec, Reader, Writer};

use self::common::SpdmOpaqueSupport;

pub const MAX_SUPPORTED_ALG_STRUCTURE_COUNT: usize = 4;

#[derive(Debug, Clone, Default)]
pub struct SpdmNegotiateAlgorithmsRequestPayload {
pub measurement_specification: SpdmMeasurementSpecification,
pub other_params_support: SpdmOpaqueSupport,
pub base_asym_algo: SpdmBaseAsymAlgo,
pub base_hash_algo: SpdmBaseHashAlgo,
pub alg_struct_count: u8,
pub alg_struct: [SpdmAlgStruct; 4],
pub alg_struct: [SpdmAlgStruct; MAX_SUPPORTED_ALG_STRUCTURE_COUNT],
}

impl SpdmCodec for SpdmNegotiateAlgorithmsRequestPayload {
Expand Down

0 comments on commit 2982c94

Please sign in to comment.