Shift to KmVersion::KEYMINT_2
- Add KmVersion::KEYMINT_2 = 200 (i.e. 100*AIDL version).
- Use KEYMINT_2 as default version for AndroidKeyMintDevice.
- Keep the version number used for messages between HAL service and TA
at the same level (4), as no message format has changed (just a new
enum value).
- Change the attestation extension version number to 200, in both the
KeyMint version and the format version.
- Change the reported version number in {KeyMint,Rpc}HardwareInfo from
1 to 2.
Bug: 194358913
Test: VtsAidKeyMintTargetTest, TreeHugger
Change-Id: Id7f763a95865b72927f11c2c1348524655a6c683
diff --git a/ng/AndroidKeyMintDevice.cpp b/ng/AndroidKeyMintDevice.cpp
index 9d0e312..9b5f76f 100644
--- a/ng/AndroidKeyMintDevice.cpp
+++ b/ng/AndroidKeyMintDevice.cpp
@@ -216,7 +216,7 @@
: impl_(new ::keymaster::AndroidKeymaster(
[&]() -> auto {
auto context = new PureSoftKeymasterContext(
- KmVersion::KEYMINT_1, static_cast<keymaster_security_level_t>(securityLevel));
+ KmVersion::KEYMINT_2, static_cast<keymaster_security_level_t>(securityLevel));
context->SetSystemVersion(::keymaster::GetOsVersion(),
::keymaster::GetOsPatchlevel());
context->SetVendorPatchlevel(::keymaster::GetVendorPatchlevel());
@@ -233,7 +233,7 @@
AndroidKeyMintDevice::~AndroidKeyMintDevice() {}
ScopedAStatus AndroidKeyMintDevice::getHardwareInfo(KeyMintHardwareInfo* info) {
- info->versionNumber = 1;
+ info->versionNumber = 2;
info->securityLevel = securityLevel_;
info->keyMintName = "FakeKeyMintDevice";
info->keyMintAuthorName = "Google";