Merge "Correct AttestKey test that checks Qualcomm's SPU waiver." am: 53faa27ace
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2450565
Change-Id: Ie2200d2c516627a80b7c1446e7c0a3d48c8735de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/security/keymint/aidl/vts/functional/AttestKeyTest.cpp b/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
index cdcaaf3..8027dce 100644
--- a/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
+++ b/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
@@ -142,11 +142,14 @@
return false;
}
- // Check if chipset has received a waiver allowing it to be launched with
- // Android S (or later) with Keymaster 4.0 in StrongBox
+ // Check if chipset has received a waiver allowing it to be launched with Android S or T with
+ // Keymaster 4.0 in StrongBox.
bool is_chipset_allowed_km4_strongbox(void) const {
std::array<char, PROPERTY_VALUE_MAX> buffer;
+ const int32_t first_api_level = property_get_int32("ro.board.first_api_level", 0);
+ if (first_api_level <= 0 || first_api_level > __ANDROID_API_T__) return false;
+
auto res = property_get("ro.vendor.qti.soc_model", buffer.data(), nullptr);
if (res <= 0) return false;