Revert "Restore "Add "Unlocked device required" parameter to keys""
This reverts commit 05900c1ad8bb08646bdcbb68a90904b86ebf1c45.
Reason for revert: Regression in creating auth-bound keys
Bug: 73773914
Bug: 67752510
Change-Id: I2b247ec871d2a0a2adb9100559e4c821aeba265d
diff --git a/keystore/key_store_service.cpp b/keystore/key_store_service.cpp
index bee9fee..89c31a5 100644
--- a/keystore/key_store_service.cpp
+++ b/keystore/key_store_service.cpp
@@ -372,7 +372,6 @@
return Status::ok();
}
- enforcement_policy.set_device_locked(true, userId);
mKeyStore->lock(userId);
*aidl_return = static_cast<int32_t>(ResponseCode::NO_ERROR);
return Status::ok();
@@ -401,7 +400,6 @@
return Status::ok();
}
- enforcement_policy.set_device_locked(false, userId);
const String8 password8(pw);
// read master key, decrypt with password, initialize mMasterKey*.
*aidl_return = static_cast<int32_t>(mKeyStore->readMasterKey(password8, userId));
@@ -1468,7 +1466,7 @@
}
Status KeyStoreService::addAuthToken(const ::std::vector<uint8_t>& authTokenAsVector,
- int32_t userId, int32_t* aidl_return) {
+ int32_t* aidl_return) {
// TODO(swillden): When gatekeeper and fingerprint are ready, this should be updated to
// receive a HardwareAuthToken, rather than an opaque byte array.
@@ -1490,8 +1488,6 @@
return Status::ok();
}
- enforcement_policy.set_device_locked(false, userId);
-
mAuthTokenTable.AddAuthenticationToken(hidlVec2AuthToken(hidl_vec<uint8_t>(authTokenAsVector)));
*aidl_return = static_cast<int32_t>(ResponseCode::NO_ERROR);
return Status::ok();