summaryrefslogtreecommitdiff
path: root/identity/aidl/default/service.cpp
diff options
context:
space:
mode:
authorSeth Moore <sethmo@google.com>2022-01-25 23:04:37 +0000
committerSeth Moore <sethmo@google.com>2022-01-25 23:04:37 +0000
commit1bf823ce75512d8514556a7c98752c1313af886b (patch)
tree8d71317158f8c634b17ea271cf7ac8070ca7688e /identity/aidl/default/service.cpp
parentff3df54c398f099089db3422f61e53e270a12b5d (diff)
Revert^2 "Add remote key provisioning to the IC HAL"
be32113307d67f54e594e5322f85b65e4e2c4fdb Change-Id: I55ddbddd0bc317f1f077a63b0275c4d55fd9c76f
Diffstat (limited to 'identity/aidl/default/service.cpp')
-rw-r--r--identity/aidl/default/service.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/identity/aidl/default/service.cpp b/identity/aidl/default/service.cpp
index 1ff52f9773..ed3c4cbcce 100644
--- a/identity/aidl/default/service.cpp
+++ b/identity/aidl/default/service.cpp
@@ -16,6 +16,7 @@
#define LOG_TAG "android.hardware.identity-service"
+#include <aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.h>
#include <android-base/logging.h>
#include <android/binder_manager.h>
#include <android/binder_process.h>
@@ -32,6 +33,7 @@ using ::android::base::LogSeverity;
using ::android::base::StderrLogger;
using ::aidl::android::hardware::identity::IdentityCredentialStore;
+using ::aidl::android::hardware::security::keymint::IRemotelyProvisionedComponent;
using ::android::hardware::identity::FakeSecureHardwareProxyFactory;
using ::android::hardware::identity::SecureHardwareProxyFactory;
@@ -47,10 +49,13 @@ int main(int /*argc*/, char* argv[]) {
InitLogging(argv, ComboLogger);
sp<SecureHardwareProxyFactory> hwProxyFactory = new FakeSecureHardwareProxyFactory();
+ const std::string remotelyProvisionedComponentName =
+ std::string(IRemotelyProvisionedComponent::descriptor) + "/default";
ABinderProcess_setThreadPoolMaxThreadCount(0);
std::shared_ptr<IdentityCredentialStore> store =
- ndk::SharedRefBase::make<IdentityCredentialStore>(hwProxyFactory);
+ ndk::SharedRefBase::make<IdentityCredentialStore>(hwProxyFactory,
+ remotelyProvisionedComponentName);
const std::string instance = std::string() + IdentityCredentialStore::descriptor + "/default";
binder_status_t status = AServiceManager_addService(store->asBinder().get(), instance.c_str());