From af2914162fbbcbc9c281aaeb6a70086bc47cc8a2 Mon Sep 17 00:00:00 2001 From: Tri Vo Date: Tue, 8 Mar 2022 10:06:00 -0800 Subject: [PATCH] KeyMint VTS: Expect empty key if boot state unverfied Bug: 221128605 Test: VtsAidlKeyMintTargetTest Change-Id: Icbf0ccf57245b2eef559a119087e15cd883239f5 --- security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp index ff4036c1a8..58d22dc26a 100644 --- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp +++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp @@ -1544,7 +1544,7 @@ bool verify_attestation_record(int32_t aidl_version, // EXPECT_EQ(verified_boot_state, VerifiedBoot::FAILED); } else { EXPECT_EQ(verified_boot_state, VerifiedBoot::UNVERIFIED); - EXPECT_NE(0, memcmp(verified_boot_key.data(), empty_boot_key.data(), + EXPECT_EQ(0, memcmp(verified_boot_key.data(), empty_boot_key.data(), verified_boot_key.size())); }