diff options
author | Eran Messeri <eranm@google.com> | 2022-03-31 14:53:49 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-03-31 14:53:49 +0000 |
commit | f9b12ac72a16973c22f0582a8961da5b6b85c900 (patch) | |
tree | de2fd563fdc108957a48172af40b8542e0694401 /security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp | |
parent | 98b2a2079c540ce6cad378221b33e422820ea5d1 (diff) | |
parent | 8adaed5f628c339bb5b9d3a0ea9b73ac57ce9ccd (diff) |
Merge "KeyMint: Device IDs attestation based on verion." am: 1b7abc43b6 am: d8fdf0b804 am: 8adaed5f62
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2028224
Change-Id: I2937358195e0218cf7337b989686f649b7e82d22
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp')
-rw-r--r-- | security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp | 8 |
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 f9510d3071..943c692c3e 100644 --- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp +++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.cpp @@ -207,6 +207,14 @@ uint32_t KeyMintAidlTestBase::boot_patch_level() { return boot_patch_level(key_characteristics_); } +/** + * An API to determine device IDs attestation is required or not, + * which is mandatory for KeyMint version 2 or first_api_level 33 or greater. + */ +bool KeyMintAidlTestBase::isDeviceIdAttestationRequired() { + return AidlVersion() >= 2 || property_get_int32("ro.vendor.api_level", 0) >= 33; +} + bool KeyMintAidlTestBase::Curve25519Supported() { // Strongbox never supports curve 25519. if (SecLevel() == SecurityLevel::STRONGBOX) { |