From 84187967cb72b471ea411ef3eac36208b22823ae Mon Sep 17 00:00:00 2001 From: Shikha Panwar Date: Mon, 15 Jan 2024 09:30:55 +0000 Subject: [PATCH] VTS to use enum for MissingAction ConstraintSpec constructor will take enum instead of boolean for missing action. Test: atest VtsSecretkeeperTargetTest Bug: 291213394 Change-Id: I55fb0d8ef1fccca5feedf1fd368854ffb7eafaaf --- .../aidl/vts/secretkeeper_test_client.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/security/secretkeeper/aidl/vts/secretkeeper_test_client.rs b/security/secretkeeper/aidl/vts/secretkeeper_test_client.rs index 4c0f659960..26fdb5688b 100644 --- a/security/secretkeeper/aidl/vts/secretkeeper_test_client.rs +++ b/security/secretkeeper/aidl/vts/secretkeeper_test_client.rs @@ -26,7 +26,7 @@ use authgraph_vts_test as ag_vts; use authgraph_boringssl as boring; use authgraph_core::key; use coset::{CborSerializable, CoseEncrypt0}; -use dice_policy::{ConstraintSpec, ConstraintType, DicePolicy}; +use dice_policy::{ConstraintSpec, ConstraintType, DicePolicy, MissingAction}; use secretkeeper_client::dice::OwnedDiceArtifactsWithExplicitKey; use secretkeeper_client::SkSession; use secretkeeper_core::cipher; @@ -255,16 +255,12 @@ fn sealing_policy(dice: &[u8]) -> Vec { let security_version: i64 = -70005; let constraint_spec = [ - ConstraintSpec::new( - ConstraintType::ExactMatch, - vec![authority_hash], - /* Optional */ false, - ), - ConstraintSpec::new(ConstraintType::ExactMatch, vec![key_mode], false), + ConstraintSpec::new(ConstraintType::ExactMatch, vec![authority_hash], MissingAction::Fail), + ConstraintSpec::new(ConstraintType::ExactMatch, vec![key_mode], MissingAction::Fail), ConstraintSpec::new( ConstraintType::GreaterOrEqual, vec![config_desc, security_version], - true, + MissingAction::Ignore, ), ];