diff options
author | David Drysdale <drysdale@google.com> | 2021-10-05 10:56:12 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-10-05 10:56:12 +0000 |
commit | 50e567ef728991937423d0a7136d3340f4329256 (patch) | |
tree | b5c47d99619dfeccc6ff353bcc06d2e135ae3e92 /security/keymint/aidl/vts/functional/KeyMintTest.cpp | |
parent | 718b3bd4de898ca3e736fb685cd388017f480b52 (diff) | |
parent | 70da8310a1a2a2365c0f2c8d4c99ca7e0b26c2ea (diff) |
Merge "KeyMint VTS: enable patchlevel checks" am: 8fb4a1c82e am: 22a5ccd132 am: a9bedb53da am: 3d6cd17f1b am: 70da8310a1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1840175
Change-Id: Ie9893cc4775fe860e6833032b23359181d9ef4c2
Diffstat (limited to 'security/keymint/aidl/vts/functional/KeyMintTest.cpp')
-rw-r--r-- | security/keymint/aidl/vts/functional/KeyMintTest.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/security/keymint/aidl/vts/functional/KeyMintTest.cpp b/security/keymint/aidl/vts/functional/KeyMintTest.cpp index 2f60b077be..fe8b48f3e5 100644 --- a/security/keymint/aidl/vts/functional/KeyMintTest.cpp +++ b/security/keymint/aidl/vts/functional/KeyMintTest.cpp @@ -69,8 +69,6 @@ namespace aidl::android::hardware::security::keymint::test { namespace { -bool check_patchLevels = false; - // The maximum number of times we'll attempt to verify that corruption // of an ecrypted blob results in an error. Retries are necessary as there // is a small (roughly 1/256) chance that corrupting ciphertext still results @@ -529,14 +527,12 @@ class NewKeyGenerationTest : public KeyMintAidlTestBase { EXPECT_TRUE(os_pl); EXPECT_EQ(*os_pl, os_patch_level()); - if (check_patchLevels) { - // Should include vendor and boot patchlevels. - auto vendor_pl = auths.GetTagValue(TAG_VENDOR_PATCHLEVEL); - EXPECT_TRUE(vendor_pl); - EXPECT_EQ(*vendor_pl, vendor_patch_level()); - auto boot_pl = auths.GetTagValue(TAG_BOOT_PATCHLEVEL); - EXPECT_TRUE(boot_pl); - } + // Should include vendor and boot patchlevels. + auto vendor_pl = auths.GetTagValue(TAG_VENDOR_PATCHLEVEL); + EXPECT_TRUE(vendor_pl); + EXPECT_EQ(*vendor_pl, vendor_patch_level()); + auto boot_pl = auths.GetTagValue(TAG_BOOT_PATCHLEVEL); + EXPECT_TRUE(boot_pl); return auths; } @@ -6720,10 +6716,6 @@ int main(int argc, char** argv) { } else { std::cout << "NOT dumping attestations" << std::endl; } - // TODO(drysdale): Remove this flag when available KeyMint devices comply with spec - if (std::string(argv[i]) == "--check_patchLevels") { - aidl::android::hardware::security::keymint::test::check_patchLevels = true; - } } } return RUN_ALL_TESTS(); |