diff --git a/gatekeeperd/Android.bp b/gatekeeperd/Android.bp index 49e8085ab..95e814b6a 100644 --- a/gatekeeperd/Android.bp +++ b/gatekeeperd/Android.bp @@ -40,8 +40,6 @@ cc_binary { "libbase", "libutils", "libcrypto", - "libkeystore_aidl", - "libkeystore_binder", "libhidlbase", "android.hardware.gatekeeper@1.0", "libgatekeeper_aidl", diff --git a/gatekeeperd/gatekeeperd.cpp b/gatekeeperd/gatekeeperd.cpp index f9c0cddb4..8792c8352 100644 --- a/gatekeeperd/gatekeeperd.cpp +++ b/gatekeeperd/gatekeeperd.cpp @@ -29,13 +29,11 @@ #include #include #include -#include #include #include #include #include // for password_handle_t #include -#include #include #include #include @@ -303,7 +301,7 @@ class GateKeeperProxy : public BnGateKeeperService { if (gkResponse->payload().size() != 0) { // try to connect to IKeystoreAuthorization AIDL service first. AIBinder* authzAIBinder = - AServiceManager_checkService("android.security.authorization"); + AServiceManager_getService("android.security.authorization"); ::ndk::SpAIBinder authzBinder(authzAIBinder); auto authzService = IKeystoreAuthorization::fromBinder(authzBinder); if (authzService) { @@ -328,21 +326,6 @@ class GateKeeperProxy : public BnGateKeeperService { LOG(ERROR) << "Failure in sending AuthToken to AuthorizationService."; return GK_ERROR; } - } - sp sm = defaultServiceManager(); - - sp binder = sm->getService(String16("android.security.keystore")); - sp service = - interface_cast(binder); - - if (service) { - int result = 0; - auto binder_result = service->addAuthToken(gkResponse->payload(), &result); - if (!binder_result.isOk() || - !keystore::KeyStoreServiceReturnCode(result).isOk()) { - LOG(ERROR) << "Failure sending auth token to KeyStore: " << result; - return GK_ERROR; - } } else { LOG(ERROR) << "Cannot deliver auth token. Unable to communicate with " "Keystore.";