Fix RKP support assumptions for keymint VTS
The support level for strongbox is different from the tee
implementation. Additionally, we were incorrectly checking the keymint
aidl version. KeyMint 1.0 supported ATTEST_KEY, so it's unclear why we
were ever checking for KeyMint 2.0.
Test: VtsAidlKeyMintTargetTest
Bug: 263844771
Change-Id: I750367902fec90204d71c1e158404b2421f9ad87
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
index fb5ef49..15b9bcc 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
@@ -1283,6 +1283,19 @@
return retval;
}
+
+bool KeyMintAidlTestBase::IsRkpSupportRequired() const {
+ if (get_vsr_api_level() >= __ANDROID_API_T__) {
+ return true;
+ }
+
+ if (get_vsr_api_level() >= __ANDROID_API_S__) {
+ return SecLevel() != SecurityLevel::STRONGBOX;
+ }
+
+ return false;
+}
+
vector<uint32_t> KeyMintAidlTestBase::ValidKeySizes(Algorithm algorithm) {
switch (algorithm) {
case Algorithm::RSA: