diff --git a/src/agent/src/initdata.rs b/src/agent/src/initdata.rs index f7d4b7774e..cd4efa6be2 100644 --- a/src/agent/src/initdata.rs +++ b/src/agent/src/initdata.rs @@ -27,6 +27,9 @@ const AA_CONFIG_KEY: &str = "aa.toml"; const CDH_CONFIG_KEY: &str = "cdh.toml"; const POLICY_KEY: &str = "policy.rego"; +/// The path of initdata toml +pub const INITDATA_TOML_PATH: &str = concatcp!(INITDATA_PATH, "/initdata.toml"); + /// The path of AA's config file pub const AA_CONFIG_PATH: &str = concatcp!(INITDATA_PATH, "/aa.toml"); @@ -95,7 +98,7 @@ pub async fn read_initdata(device_path: &str) -> Result> { } pub struct InitdataReturnValue { - pub digest: Vec, + pub _digest: Vec, pub _policy: Option, } @@ -122,7 +125,11 @@ pub async fn initialize_initdata(logger: &Logger) -> Result Sha256::digest(&initdata_content).to_vec(), "sha384" => Sha384::digest(&initdata_content).to_vec(), "sha512" => Sha512::digest(&initdata_content).to_vec(), @@ -143,10 +150,10 @@ pub async fn initialize_initdata(logger: &Logger) -> Result