Revert "Revert "Keystore 2.0: Move keymint spec to security name..."
Revert "Revert "Keystore 2.0: Move keymint spec to security name..."
Revert^2 "Remove references to keymint1"
34536a352803a08776cc4f373d93a94e1fcbf98e
Bug: 175345910
Bug: 171429297
Change-Id: Ib500ff822958804b4aa031c114b7520fa70cd84d
diff --git a/keystore2/Android.bp b/keystore2/Android.bp
index 4e819b8..e63a469 100644
--- a/keystore2/Android.bp
+++ b/keystore2/Android.bp
@@ -19,7 +19,7 @@
rustlibs: [
"android.system.keystore2-rust",
- "android.hardware.keymint-rust",
+ "android.hardware.security.keymint-rust",
"libanyhow",
"libbinder_rs",
"libkeystore2_selinux",
@@ -41,7 +41,7 @@
test_config: "AndroidTest.xml",
rustlibs: [
"android.system.keystore2-rust",
- "android.hardware.keymint-rust",
+ "android.hardware.security.keymint-rust",
"libandroid_logger",
"libanyhow",
"libbinder_rs",
diff --git a/keystore2/aidl/Android.bp b/keystore2/aidl/Android.bp
index 00f38aa..3b2dff0 100644
--- a/keystore2/aidl/Android.bp
+++ b/keystore2/aidl/Android.bp
@@ -17,7 +17,7 @@
srcs: [
"android/security/attestationmanager/*.aidl",
],
- imports: [ "android.hardware.keymint" ],
+ imports: [ "android.hardware.security.keymint" ],
unstable: true,
backend: {
java: {
diff --git a/keystore2/aidl/android/security/attestationmanager/IAttestationManager.aidl b/keystore2/aidl/android/security/attestationmanager/IAttestationManager.aidl
index d88a298..85eee57 100644
--- a/keystore2/aidl/android/security/attestationmanager/IAttestationManager.aidl
+++ b/keystore2/aidl/android/security/attestationmanager/IAttestationManager.aidl
@@ -17,7 +17,7 @@
package android.security.attestationmanager;
import android.security.attestationmanager.ByteArray;
-import android.hardware.keymint.KeyParameter;
+import android.hardware.security.keymint.KeyParameter;
/**
* Internal interface for performing device attestation.
diff --git a/keystore2/src/database.rs b/keystore2/src/database.rs
index 0db4162..45d561a 100644
--- a/keystore2/src/database.rs
+++ b/keystore2/src/database.rs
@@ -46,7 +46,7 @@
use crate::permission::KeyPermSet;
use anyhow::{anyhow, Context, Result};
-use android_hardware_keymint::aidl::android::hardware::keymint::SecurityLevel::SecurityLevel;
+use android_hardware_security_keymint::aidl::android::hardware::security::keymint::SecurityLevel::SecurityLevel;
use android_system_keystore2::aidl::android::system::keystore2::{
Domain::Domain, KeyDescriptor::KeyDescriptor,
};
diff --git a/keystore2/src/error.rs b/keystore2/src/error.rs
index 49d72bb..b4cf913 100644
--- a/keystore2/src/error.rs
+++ b/keystore2/src/error.rs
@@ -32,7 +32,7 @@
use std::cmp::PartialEq;
-pub use android_hardware_keymint::aidl::android::hardware::keymint::ErrorCode::ErrorCode;
+pub use android_hardware_security_keymint::aidl::android::hardware::security::keymint::ErrorCode::ErrorCode;
pub use android_system_keystore2::aidl::android::system::keystore2::ResponseCode::ResponseCode;
use keystore2_selinux as selinux;
diff --git a/keystore2/src/key_parameter.rs b/keystore2/src/key_parameter.rs
index 5698c96..7f2dc56 100644
--- a/keystore2/src/key_parameter.rs
+++ b/keystore2/src/key_parameter.rs
@@ -19,7 +19,7 @@
use crate::error::Error as KeystoreError;
use crate::error::ResponseCode;
-pub use android_hardware_keymint::aidl::android::hardware::keymint::{
+pub use android_hardware_security_keymint::aidl::android::hardware::security::keymint::{
Algorithm::Algorithm, BlockMode::BlockMode, Digest::Digest, EcCurve::EcCurve,
HardwareAuthenticatorType::HardwareAuthenticatorType, KeyOrigin::KeyOrigin,
KeyParameter::KeyParameter as KmKeyParameter, KeyPurpose::KeyPurpose, PaddingMode::PaddingMode,
diff --git a/keystore2/src/operation.rs b/keystore2/src/operation.rs
index 14edc6c..13a9b0c 100644
--- a/keystore2/src/operation.rs
+++ b/keystore2/src/operation.rs
@@ -134,7 +134,7 @@
use crate::error::{map_km_error, map_or_log_err, Error, ErrorCode, ResponseCode};
use crate::utils::Asp;
-use android_hardware_keymint::aidl::android::hardware::keymint::{
+use android_hardware_security_keymint::aidl::android::hardware::security::keymint::{
ByteArray::ByteArray, IKeyMintOperation::IKeyMintOperation,
KeyParameter::KeyParameter as KmParam, KeyParameterArray::KeyParameterArray, Tag::Tag,
};
diff --git a/keystore2/src/security_level.rs b/keystore2/src/security_level.rs
index 24a2e99..e7d07e3 100644
--- a/keystore2/src/security_level.rs
+++ b/keystore2/src/security_level.rs
@@ -16,7 +16,7 @@
//! This crate implements the IKeystoreSecurityLevel interface.
-use android_hardware_keymint::aidl::android::hardware::keymint::{
+use android_hardware_security_keymint::aidl::android::hardware::security::keymint::{
Algorithm::Algorithm, ByteArray::ByteArray, Certificate::Certificate as KmCertificate,
HardwareAuthenticatorType::HardwareAuthenticatorType, IKeyMintDevice::IKeyMintDevice,
KeyCharacteristics::KeyCharacteristics, KeyFormat::KeyFormat, KeyParameter::KeyParameter,
diff --git a/keystore2/src/service.rs b/keystore2/src/service.rs
index 71aecbd..eb0d01b 100644
--- a/keystore2/src/service.rs
+++ b/keystore2/src/service.rs
@@ -27,7 +27,7 @@
use crate::utils::{
check_grant_permission, check_key_permission, key_parameters_to_authorizations, Asp,
};
-use android_hardware_keymint::aidl::android::hardware::keymint::SecurityLevel::SecurityLevel;
+use android_hardware_security_keymint::aidl::android::hardware::security::keymint::SecurityLevel::SecurityLevel;
use android_system_keystore2::aidl::android::system::keystore2::{
Domain::Domain, IKeystoreSecurityLevel::IKeystoreSecurityLevel,
IKeystoreService::BnKeystoreService, IKeystoreService::IKeystoreService,
diff --git a/keystore2/src/utils.rs b/keystore2/src/utils.rs
index 1c678c3..66f3db6 100644
--- a/keystore2/src/utils.rs
+++ b/keystore2/src/utils.rs
@@ -18,7 +18,7 @@
use crate::permission;
use crate::permission::{KeyPerm, KeyPermSet, KeystorePerm};
use crate::{error::Error, key_parameter::KeyParameterValue};
-use android_hardware_keymint::aidl::android::hardware::keymint::{
+use android_hardware_security_keymint::aidl::android::hardware::security::keymint::{
KeyCharacteristics::KeyCharacteristics, SecurityLevel::SecurityLevel,
};
use android_system_keystore2::aidl::android::system::keystore2::{