Merge "[dice] Adjust the output type of make_sample_bcc_and_cdis()" am: f29985ae57 am: 40301c8bc7

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2426092

Change-Id: I75abfbc1dca8fb89a9a9a7f06abc1e01e8b16cc8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Alice Wang 2023-02-09 17:37:08 +00:00 committed by Automerger Merge Worker
commit bb8ad9d128

View file

@ -21,7 +21,6 @@ use diced::{
};
use diced_sample_inputs::make_sample_bcc_and_cdis;
use serde::{Deserialize, Serialize};
use std::convert::TryInto;
use std::panic;
use std::sync::Arc;
@ -76,7 +75,7 @@ fn main() {
// Saying hi.
log::info!("android.hardware.security.dice is starting.");
let (cdi_attest, cdi_seal, bcc) =
let dice_artifacts =
make_sample_bcc_and_cdis().expect("Failed to construct sample dice chain.");
let hal_impl = Arc::new(
@ -85,13 +84,9 @@ fn main() {
// This service does not start a thread pool. The main thread is the only thread
// joining the thread pool, thereby keeping the process single threaded.
ResidentHal::new(InsecureSerializableArtifacts {
cdi_attest: cdi_attest[..]
.try_into()
.expect("Failed to convert cdi_attest to array reference."),
cdi_seal: cdi_seal[..]
.try_into()
.expect("Failed to convert cdi_seal to array reference."),
bcc,
cdi_attest: dice_artifacts.cdi_values.cdi_attest,
cdi_seal: dice_artifacts.cdi_values.cdi_seal,
bcc: dice_artifacts.bcc[..].to_vec(),
})
}
.expect("Failed to create ResidentHal implementation."),