From 4387c4d6195da9a203d5db13638c07a56371dd6c Mon Sep 17 00:00:00 2001 From: Tri Vo Date: Wed, 24 May 2023 14:13:03 -0400 Subject: [PATCH] KM 4 test fix Root-of-Trust parsing ROT was previously parsed into local variable, then discarded. Fix it so that we are actually using parsed values. Bug: 283892150 Test: VtsHalKeymasterV4_0TargetTest Change-Id: I8af439d6262141648b01f1accaa9eb739fea85f8 --- keymaster/4.0/vts/functional/BootloaderStateTest.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/keymaster/4.0/vts/functional/BootloaderStateTest.cpp b/keymaster/4.0/vts/functional/BootloaderStateTest.cpp index 6b5e8bf856..912b59b2d2 100644 --- a/keymaster/4.0/vts/functional/BootloaderStateTest.cpp +++ b/keymaster/4.0/vts/functional/BootloaderStateTest.cpp @@ -60,13 +60,9 @@ class BootloaderStateTest : public KeymasterHidlTest { ASSERT_TRUE(attest_rec) << "Failed to get attestation record."; // Parse root of trust. - HidlBuf verified_boot_key; - keymaster_verified_boot_t verified_boot_state; - bool device_locked; - HidlBuf verified_boot_hash; - auto result = - parse_root_of_trust(attest_rec->data, attest_rec->length, &verified_boot_key, - &verified_boot_state, &device_locked, &verified_boot_hash); + auto result = parse_root_of_trust(attest_rec->data, attest_rec->length, &attestedVbKey_, + &attestedVbState_, &attestedBootloaderState_, + &attestedVbmetaDigest_); ASSERT_EQ(result, ErrorCode::OK) << "Failed to parse root of trust."; }