• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 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 package android.security.remoteprovisioning;
18 
19 import android.security.remoteprovisioning.RemotelyProvisionedKey;
20 
21 /**
22  * This is the interface providing access to remotely-provisioned attestation keys
23  * for an `IRemotelyProvisionedComponent`.
24  *
25  * @hide
26  */
27 interface IRemotelyProvisionedKeyPool {
28 
29     /**
30      * Fetches an attestation key for the given uid and `IRemotelyProvisionedComponent`, as
31      * identified by the given id.
32 
33      * Callers require the keystore2::get_attestation_key permission.
34      *
35      * ## Error conditions
36      * `android.system.keystore2.ResponseCode::PERMISSION_DENIED` if the caller does not have the
37      *      `keystore2::get_attestation_key` permission
38      *
39      * @param clientUid The client application for which an attestation key is needed.
40      *
41      * @param irpcId The unique identifier for the `IRemotelyProvisionedComponent` for which a key
42      *      is requested. This id may be retrieved from a given component via the
43      *      `IRemotelyProvisionedComponent::getHardwareInfo` function.
44      *
45      * @return A `RemotelyProvisionedKey` parcelable containing a key and certification chain for
46      *      the given `IRemotelyProvisionedComponent`.
47      */
getAttestationKey(in int clientUid, in @utf8InCpp String irpcId)48     RemotelyProvisionedKey getAttestationKey(in int clientUid, in @utf8InCpp String irpcId);
49 }
50