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