From 1eae7abfaaec996f615b13f42d91f865d315c4b2 Mon Sep 17 00:00:00 2001 From: Shikha Panwar Date: Fri, 22 Dec 2023 21:30:59 +0000 Subject: [PATCH] VTS: Use encoding of policy on explicit key dice As we make Dice policy work with explicit key format of dice chain, the hard coded policy needs to change to be compatible with hard coded explicit key chain in the TA. Test: VTS Bug: 291213394 Change-Id: Ib3740d8f12f0a5f4e680bd215170bc96596fbe06 --- .../secretkeeper/aidl/vts/secretkeeper_test_client.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/security/secretkeeper/aidl/vts/secretkeeper_test_client.rs b/security/secretkeeper/aidl/vts/secretkeeper_test_client.rs index eeef6fc000..37b280422d 100644 --- a/security/secretkeeper/aidl/vts/secretkeeper_test_client.rs +++ b/security/secretkeeper/aidl/vts/secretkeeper_test_client.rs @@ -40,10 +40,11 @@ const CURRENT_VERSION: u64 = 1; // TODO(b/291238565): This will change once libdice_policy switches to Explicit-key DiceCertChain // This is generated by patching libdice_policy such that it dumps an example dice chain & // a policy, such that the former matches the latter. -const HYPOTHETICAL_DICE_POLICY: [u8; 43] = [ - 0x83, 0x01, 0x81, 0x83, 0x01, 0x80, 0xA1, 0x01, 0x00, 0x82, 0x83, 0x01, 0x81, 0x01, 0x73, 0x74, - 0x65, 0x73, 0x74, 0x69, 0x6E, 0x67, 0x5F, 0x64, 0x69, 0x63, 0x65, 0x5F, 0x70, 0x6F, 0x6C, 0x69, - 0x63, 0x79, 0x83, 0x02, 0x82, 0x03, 0x18, 0x64, 0x19, 0xE9, 0x75, +const HYPOTHETICAL_DICE_POLICY: [u8; 49] = [ + 0x84, 0x01, 0x81, 0x83, 0x01, 0x80, 0x01, 0x81, 0x83, 0x01, 0x80, 0x43, 0xa1, 0x01, 0x00, 0x82, + 0x83, 0x01, 0x81, 0x01, 0x73, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x69, 0x63, + 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x83, 0x02, 0x82, 0x03, 0x18, 0x64, 0x19, 0xe9, + 0x75, ]; // Random bytes (of ID_SIZE/SECRET_SIZE) generated for tests.