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; 18 19 /** 20 * Interface to allow the framework to notify the RemoteProvisioner app when keys are empty. This 21 * will be used if Keystore replies with an error code NO_KEYS_AVAILABLE in response to an 22 * attestation request. The framework can then synchronously call generateKey() to get more 23 * attestation keys generated and signed. Upon return, the caller can be certain an attestation key 24 * is available. 25 * 26 * @hide 27 */ 28 interface IGenerateRkpKeyService { 29 /** 30 * Ping the provisioner service to let it know an app generated a key. This may or may not have 31 * consumed a remotely provisioned attestation key, so the RemoteProvisioner app should check. 32 */ notifyKeyGenerated(in int securityLevel)33 oneway void notifyKeyGenerated(in int securityLevel); 34 /** Ping the provisioner service to indicate there are no remaining attestation keys left. */ generateKey(in int securityLevel)35 void generateKey(in int securityLevel); 36 } 37