diff --git a/keylime-agent/src/main.rs b/keylime-agent/src/main.rs index 6b81d966..34e76f7f 100644 --- a/keylime-agent/src/main.rs +++ b/keylime-agent/src/main.rs @@ -438,9 +438,9 @@ async fn main() -> Result<()> { let (attest, signature) = if config.agent.enable_iak_idevid { let qualifying_data = config.agent.uuid.as_bytes(); let (attest, signature) = ctx.certify_credential_with_iak( - Data::try_from(qualifying_data).unwrap(), + Data::try_from(qualifying_data).unwrap(), //#[allow_ci] ak_handle, - iak.as_ref().unwrap().handle, + iak.as_ref().unwrap().handle, //#[allow_ci] )?; info!("AK certified with IAK."); @@ -449,7 +449,7 @@ async fn main() -> Result<()> { // let (hashed_attest, _) = ctx.inner.hash(max_b, HashingAlgorithm::Sha256, Hierarchy::Endorsement,)?; // println!("{:?}", hashed_attest); // println!("{:?}", signature); - // println!("{:?}", ctx.inner.verify_signature(iak.as_ref().unwrap().handle, hashed_attest, signature.clone())?); + // println!("{:?}", ctx.inner.verify_signature(iak.as_ref().unwrap().handle, hashed_attest, signature.clone())?); //#[allow_ci] (Some(attest), Some(signature)) } else { (None, None) @@ -577,15 +577,15 @@ async fn main() -> Result<()> { ek_result.ek_cert, &PublicBuffer::try_from(ak.public)?.marshall()?, Some( - &PublicBuffer::try_from(iak.unwrap().public.clone())? + &PublicBuffer::try_from(iak.unwrap().public.clone())? //#[allow_ci] .marshall()?, ), Some( - &PublicBuffer::try_from(idevid.unwrap().public.clone())? + &PublicBuffer::try_from(idevid.unwrap().public.clone())? //#[allow_ci] .marshall()?, ), - Some(attest.unwrap().marshall()?), - Some(signature.unwrap().marshall()?), + Some(attest.unwrap().marshall()?), //#[allow_ci] + Some(signature.unwrap().marshall()?), //#[allow_ci] mtls_cert, config.agent.contact_ip.as_ref(), config.agent.contact_port, diff --git a/keylime-agent/src/registrar_agent.rs b/keylime-agent/src/registrar_agent.rs index c7606768..b36db2d2 100644 --- a/keylime-agent/src/registrar_agent.rs +++ b/keylime-agent/src/registrar_agent.rs @@ -223,6 +223,10 @@ mod tests { &mock_data, Some(mock_data.to_vec()), &mock_data, + None, + None, + None, + None, Some(&cert), "", 0, @@ -265,6 +269,10 @@ mod tests { &mock_data, None, &mock_data, + None, + None, + None, + None, Some(&cert), "", 0, @@ -303,6 +311,10 @@ mod tests { &mock_data, Some(mock_data.to_vec()), &mock_data, + None, + None, + None, + None, Some(&cert), "", 0, diff --git a/keylime/src/tpm.rs b/keylime/src/tpm.rs index e98dc9be..3c20c6f5 100644 --- a/keylime/src/tpm.rs +++ b/keylime/src/tpm.rs @@ -337,14 +337,14 @@ impl Context { .execute_with_nullauth_session(|ctx| { ctx.create_primary( Hierarchy::Endorsement, - key_pub.unwrap().public, + key_pub.unwrap().public, //#[allow_ci] None, None, None, Some(pcr_selection_list), ) }) - .unwrap(); + .unwrap(); //#[allow_ci] Ok(IDevIDResult { public: primary_key.out_public, @@ -471,7 +471,7 @@ impl Context { }; Ok(IDevIDPublic { - public: key_builder.build().unwrap(), + public: key_builder.build().unwrap(), //#[allow_ci] }) } @@ -506,14 +506,14 @@ impl Context { .execute_with_nullauth_session(|ctx| { ctx.create_primary( Hierarchy::Endorsement, - key_pub.unwrap().public, + key_pub.unwrap().public, //#[allow_ci] None, None, None, Some(pcr_selection_list), ) }) - .unwrap(); + .unwrap(); //#[allow_ci] Ok(IAKResult { public: primary_key.out_public, @@ -640,7 +640,7 @@ impl Context { }; Ok(IAKPublic { - public: key_builder.build().unwrap(), + public: key_builder.build().unwrap(), //#[allow_ci] }) }