summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndres Morales2015-04-03 18:40:15 -0500
committerAndres Morales2015-04-08 17:20:22 -0500
commit2d08dce0beedcfc63b2a837045d1be7d49157555 (patch)
tree0a74bf6cd5b25138d1fc63ae8c0df389912efb0f /gatekeeperd/IGateKeeperService.h
parent56b8a6a59f6e86ba88ede9719e3445e8eb3187ae (diff)
downloadplatform-system-core-2d08dce0beedcfc63b2a837045d1be7d49157555.tar.gz
platform-system-core-2d08dce0beedcfc63b2a837045d1be7d49157555.tar.xz
platform-system-core-2d08dce0beedcfc63b2a837045d1be7d49157555.zip
GateKeeper proxy service
Until we have SELinux support for gating access to individual TEE services, we will proxy TEE requests to GateKeeper via this daemon. Change-Id: Ifa316b75f75bff79bdae613a112c8c3c2e7189a8
Diffstat (limited to 'gatekeeperd/IGateKeeperService.h')
-rw-r--r--gatekeeperd/IGateKeeperService.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/gatekeeperd/IGateKeeperService.h b/gatekeeperd/IGateKeeperService.h
new file mode 100644
index 000000000..7d8572cec
--- /dev/null
+++ b/gatekeeperd/IGateKeeperService.h
@@ -0,0 +1,70 @@
1/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef IGATEKEEPER_SERVICE_H_
18#define IGATEKEEPER_SERVICE_H_
19
20#include <binder/IInterface.h>
21#include <binder/Parcel.h>
22
23namespace android {
24
25/*
26 * This must be kept manually in sync with frameworks/base's IGateKeeperService.aidl
27 */
28class IGateKeeperService : public IInterface {
29public:
30 enum {
31 ENROLL = IBinder::FIRST_CALL_TRANSACTION + 0,
32 VERIFY = IBinder::FIRST_CALL_TRANSACTION + 1,
33 };
34
35 // DECLARE_META_INTERFACE - C++ client interface not needed
36 static const android::String16 descriptor;
37 virtual const android::String16& getInterfaceDescriptor() const;
38 IGateKeeperService() {}
39 virtual ~IGateKeeperService() {}
40
41 /**
42 * Enrolls a password with the GateKeeper. Returns 0 on success, negative on failure.
43 */
44 virtual status_t enroll(uint32_t uid,
45 const uint8_t *current_password_handle, uint32_t current_password_handle_length,
46 const uint8_t *current_password, uint32_t current_password_length,
47 const uint8_t *desired_password, uint32_t desired_password_length,
48 uint8_t **enrolled_password_handle, uint32_t *enrolled_password_handle_length) = 0;
49
50 /**
51 * Verifies a password previously enrolled with the GateKeeper.
52 * Returns 0 on success, negative on failure.
53 */
54 virtual status_t verify(uint32_t uid,
55 const uint8_t *enrolled_password_handle, uint32_t enrolled_password_handle_length,
56 const uint8_t *provided_password, uint32_t provided_password_length) = 0;
57};
58
59// ----------------------------------------------------------------------------
60
61class BnGateKeeperService: public BnInterface<IGateKeeperService> {
62public:
63 virtual status_t onTransact(uint32_t code, const Parcel& data, Parcel* reply,
64 uint32_t flags = 0);
65};
66
67} // namespace android
68
69#endif
70