• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# HUKS Error Codes
2
3<!--Kit: Universal Keystore Kit-->
4<!--Subsystem: Security-->
5<!--Owner: @wutiantian-gitee-->
6<!--Designer: @HighLowWorld-->
7<!--Tester: @wxy1234564846-->
8<!--Adviser: @zengyawen-->
9
10> **NOTE**
11>
12> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](../errorcode-universal.md).
13
14## 12000001 Feature Not Supported
15
16**Error Message**
17
18The `${messageInfo}` is not supported.
19
20**Possible Causes**
21
22The API is supported, but certain features in the API, such as the algorithm, are not supported.
23
24**Solution**
25
26Use the supported features as parameters.
27
28## 12000002 Missing Key Algorithm Parameter
29**Error Message**
30
31Failed to obtain the `${messageInfo}`. It is not set in ParamSet.
32
33**Possible Causes**
34
35The key parameter is not set.
36
37**Solution**
38
391. Determine the missing parameter from the error message.
402. Set the parameter.
41
42## 12000003 Invalid Key Algorithm Parameter
43
44**Error Message**
45
46Invalid `${messageInfo}`.
47
48**Possible Causes**
49
50An invalid parameter is found.
51
52**Solution**
53
541. Determine the invalid parameter from the error message.
552. Correct the invalid parameter.
56
57## 12000004 File Error
58
59**Error Message**
60
61A file error can be any of the following:
62
63- Insufficient storage space.
64- Invalid file size.
65- Failed to `${messageInfo}`.
66
67
68**Possible Causes**
69
70The file operation failed.
71
72**Solution**
73
741. Check whether the sufficient disk space is available and whether the file system is normal.
752. Clear the disk space.
76
77## 12000005 IPC Error
78
79**Error Message**
80
81A file error can be any of the following:
82
83- Failed to get messages from IPC.
84- IPC `${messageInfo}`.
85
86**Possible Causes**
87
88The Inter-Process Communication (IPC) failed.
89
90**Solution**
91
92Locate and rectify the IPC failure.
93
94## 12000006 Algorithm Library Operation Failed
95
96**Error Message**
97
98Crypto engine error.
99
100**Possible Causes**
101
102The algorithm library operation fails. The possible causes include the following:
103
1041. The encryption and decryption on the algorithm library failed due to incorrect ciphertext data.
1052. Incorrect key parameters exist.
106
107**Solution**
108
1091. Check and correct the ciphertext data.
1102. Check and correct the key parameters.
111
112## 12000007 Failed to Access the Key Due to Invalidated Credential
113
114**Error Message**
115
116This credential is invalidated permanently.
117
118**Possible Causes**
119
120The possible causes include the following:
121
1221. The key is configured with the user access control attribute and becomes invalid after the password is cleared.
1232. The key is configured with the user access control attribute and becomes invalid after a new biometric feature is enrolled.
124
125**Solution**
126
1271. Locate the cause of the authentication failure based on the log.
1282. If the authentication fails due to the configuration of the access control attribute, the key cannot be used any longer.
129
130## 12000008 Failed to Access the Key Due to a Failure in Authentication Token Verification
131
132**Error Message**
133
134The authentication token verification failed.
135
136**Possible Causes**
137
138The challenge value is incorrect.
139
140**Solution**
141
1421. Check whether the challenge for user IAM authentication is correctly assembled.
1432. If the challenge value is incorrect, modify the assembly mode, use the bytes generated by HUKS to assembly the challenge value, and pass it to user IAM for authentication.
144
145## 12000009 Key Access Timed Out
146
147**Error Message**
148
149This authentication token timed out.
150
151**Possible Causes**
152
153The authentication failed because the authentication token timed out.
154
155**Solution**
156
157Initialize the key and perform the authentication again. Ensure that the difference between the current time and the authentication token generation time is less than the timeout interval.
158
159## 12000010 Key Operation Sessions Reaches the Limit
160
161**Error Message**
162
163The number of key operation sessions has reached the limit.
164
165**Possible Causes**
166
167The number of concurrent key operation sessions has reached the maximum (15).
168
169**Solution**
170
1711. Check whether there are multiple key session operations (**init** operations) for the same application. If yes, modify the code to avoid concurrent invoking.
1722. If the key operation sessions are set up for different applications, wait until the sessions are released.
173
174## 12000011 The Entity Does Not Exist
175
176**Error Message**
177
178The entity does not exist.
179
180**Possible Causes**
181
182The key corresponding to the key alias does not exist.
183
184**Solution**
185
1861. Check whether the key alias is correctly spelled.
1872. Check whether the key corresponding to the key alias is successfully generated.
188
189## 12000012 External Error
190
191**Error Message**
192
193Device environment or input parameter abnormal.
194
195**Possible Causes**
196
197An external error, such as a hardware fault or file error, occurs.
198
199**Solution**
200
201Provide the error code and log information to the related party.
202
203## 12000013 The Credential Does Not Exist
204
205**Error Message**
206
207The credential does not exist.
208
209**Possible Causes**
210
211The credential, such as the PIN, fingerprint, or face image, is not enrolled.
212
213**Solution**
214
215Enroll the credential or change the authentication type bound to the key.
216
217## 12000014 Insufficient Memory
218
219**Error Message**
220
221A file error can be any of the following:
222
223- Insufficient memory.
224- Malloc failed.
225
226**Possible Causes**
227
228The system memory is insufficient, or the buffer allocated for the output parameter is too small.
229
230**Solution**
231
2321. Release memory or restart the device.
2332. Check whether the buffer allocated for the output parameter is too small.
234
235## 12000015 Failed to Invoke Other System Services
236
237**Error Message**
238
239Failed to obtain the `${messageInfo}` information via UserIAM.
240
241**Possible Causes**
242
243The called system service has not started.
244
245**Solution**
246
247Wait for the system service to start and call the API again.
248
249## 12000017 Duplicate Key Alias
250
251**Error Message**
252
253The key with same alias is already exist.
254
255**Possible Causes**
256
257The same key alias already exists and cannot be overwritten.
258
259**Solution**
260
261Check whether the same key alias needs to be overwritten as needed.
262
263## 12000018 Invalid Input Parameter
264
265**Error Message**
266
267The input parameter is invalid.
268
269**Possible Causes**
270
2711. A mandatory parameter is not passed.
272
2732. A parameter type is incorrect (Type Error).
274
2753. A null parameter is incorrect (Null Argument Error).
276
2774. A value range is incorrect (Value Range Error).
278
279**Solution**
280
281Make sure all the mandatory parameters are passed in and the types of the passed-in parameter are valid. If parameter verification fails, read the parameter specifications and locate the fault based on the possible causes.
282