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