1 /* 2 * Copyright (c) 2019, 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.identity; 18 19 import android.security.identity.IWritableCredential; 20 import android.security.identity.ICredential; 21 import android.security.identity.SecurityHardwareInfoParcel; 22 23 /** 24 * @hide 25 */ 26 interface ICredentialStore { 27 /* All binder calls may return a ServiceSpecificException 28 * with the following error codes: 29 */ 30 const int ERROR_NONE = 0; 31 const int ERROR_GENERIC = 1; 32 const int ERROR_ALREADY_PERSONALIZED = 2; 33 const int ERROR_NO_SUCH_CREDENTIAL = 3; 34 const int ERROR_CIPHER_SUITE_NOT_SUPPORTED = 4; 35 const int ERROR_EPHEMERAL_PUBLIC_KEY_NOT_FOUND = 5; 36 const int ERROR_NO_AUTHENTICATION_KEY_AVAILABLE = 6; 37 const int ERROR_INVALID_READER_SIGNATURE = 7; 38 const int ERROR_DOCUMENT_TYPE_NOT_SUPPORTED = 8; 39 const int ERROR_AUTHENTICATION_KEY_NOT_FOUND = 9; 40 const int ERROR_INVALID_ITEMS_REQUEST_MESSAGE = 10; 41 const int ERROR_SESSION_TRANSCRIPT_MISMATCH = 11; 42 getSecurityHardwareInfo()43 SecurityHardwareInfoParcel getSecurityHardwareInfo(); 44 createCredential(in @tf8InCpp String credentialName, in @utf8InCpp String docType)45 IWritableCredential createCredential(in @utf8InCpp String credentialName, 46 in @utf8InCpp String docType); getCredentialByName(in @tf8InCpp String credentialName, in int cipherSuite)47 ICredential getCredentialByName(in @utf8InCpp String credentialName, 48 in int cipherSuite); 49 } 50