summaryrefslogtreecommitdiff
path: root/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
diff options
context:
space:
mode:
authorRajesh Nyamagoud <nyamagoud@google.com>2023-01-06 00:27:56 +0000
committerRajesh Nyamagoud <nyamagoud@google.com>2023-02-20 20:40:12 +0000
commit5283f81f64f6f16bf06841cd2296788a9ac64d07 (patch)
tree4cbe72492a284c19db4a301cf5f1f1bf15923544 /security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
parent72394c7c559f6d4386de67f6e3a2f068fab4d07f (diff)
Adding a test using second IMEI as attestation ids.
1. Using second IMEI as attestation id without using first IMEI. Test should generate a key using second IMEI as attestation id without using first IMEI as attestation id. Test should validate second IMEI in attesation record. 2. Using first IMEI as well as second IMEI as attestation ids. Test should generate a key using first IMEI and second IMEI as attestation ids. Test should validate first IMEI and second IMEI in attestation record. Test: atest -c VtsAidlKeyMintTargetTest Bug: 263197083, 264979486 Change-Id: I61c3f32e15a8d478a838d14e7db9917a33682267
Diffstat (limited to 'security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp')
-rw-r--r--security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
index 588a1d44a0..ebea8b27a8 100644
--- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
+++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp
@@ -217,6 +217,14 @@ bool KeyMintAidlTestBase::isDeviceIdAttestationRequired() {
return AidlVersion() >= 2 || property_get_int32("ro.vendor.api_level", 0) >= 33;
}
+/**
+ * An API to determine second IMEI ID attestation is required or not,
+ * which is supported for KeyMint version 3 or first_api_level greater than 33.
+ */
+bool KeyMintAidlTestBase::isSecondImeiIdAttestationRequired() {
+ return AidlVersion() >= 3 && property_get_int32("ro.vendor.api_level", 0) > 33;
+}
+
bool KeyMintAidlTestBase::Curve25519Supported() {
// Strongbox never supports curve 25519.
if (SecLevel() == SecurityLevel::STRONGBOX) {