1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.security.rkp;
import android.security.rkp.IRegistration;
import android.security.rkp.IGetRegistrationCallback;
/**
* {@link IRemoteProvisioning} is the interface provided to use the remote key
* provisioning functionality from the Remote Key Provisioning Daemon (RKPD).
* This would be the first service that RKPD clients would interact with. The
* intent is for the clients to get the {@link IRegistration} object from this
* interface and use it for actual remote provisioning work.
*
* @hide
*/
oneway interface IRemoteProvisioning {
/**
* Takes a remotely provisioned component service name and gets a
* registration bound to that service and the caller's UID.
*
* @param irpcName The name of the {@code IRemotelyProvisionedComponent}
* for which remotely provisioned keys should be managed.
* @param callback Receives the result of the call. A callback must only
* be used with one {@code getRegistration} call at a time.
*
* Notes:
* - This function will attempt to get the service named by irpcName. This
* implies that a lazy/dynamic aidl service will be instantiated, and this
* function blocks until the service is up. Upon return, any binder tokens
* are dropped, allowing the lazy/dynamic service to shutdown.
* - The created registration object is unique per caller. If two different
* UIDs call getRegistration with the same irpcName, they will receive
* different registrations. This prevents two different applications from
* being able to see the same keys.
* - This function is idempotent per calling UID. Additional calls to
* getRegistration with the same parameters, from the same caller, will have
* no side effects.
* - A callback may only be associated with one getRegistration call at a time.
* If the callback is used multiple times, this API will return an error.
*
* @see IRegistration#getKey()
* @see IRemotelyProvisionedComponent
*
*/
void getRegistration(String irpcName, IGetRegistrationCallback callback);
}
|