1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #include "hksipc_fuzzer.h"
16 
17 #include <cstring>
18 #include <securec.h>
19 #include <vector>
20 #include "message_parcel.h"
21 
22 #include "file_ex.h"
23 #include "hks_api.h"
24 #include "hks_ipc_service.h"
25 #include "hks_log.h"
26 #include "hks_mem.h"
27 #include "hks_param.h"
28 #include "hks_service_ipc_serialization.h"
29 #include "hks_type.h"
30 #include "hks_type_inner.h"
31 
32 #include "hks_fuzz_util.h"
33 
34 namespace OHOS {
35 namespace Security {
36 namespace Hks {
37 
38 /**
39  * @tc.name: HksIpcSerializationTest.HksIpcSerializationTest001
40  * @tc.desc: tdd HksParamSetToParams, expect HKS_SUCCESS
41  * @tc.type: FUNC
42  */
HksIpcSerializationTest001()43 static void HksIpcSerializationTest001()
44 {
45     HKS_LOG_I("enter HksIpcSerializationTest001");
46     struct HksParamSet *paramSet = nullptr;
47     int32_t ret = HksInitParamSet(&paramSet);
48     const char *alias = "alias";
49     struct HksBlob aliasBlob = { .size = strlen(alias), .data = (uint8_t *)alias };
50     struct HksParam aliasParam = { .tag = HKS_TAG_ATTESTATION_ID_ALIAS, .blob = aliasBlob };
51     ret = HksAddParams(paramSet, &aliasParam, 1);
52     ret = HksBuildParamSet(&paramSet);
53     struct HksParamOut aliasOutParam = { .tag = HKS_TAG_ATTESTATION_ID_ALIAS, .blob = &aliasBlob };
54     ret = HksParamSetToParams(paramSet, &aliasOutParam, 1);
55     HksFreeParamSet(&paramSet);
56 }
57 
58 /**
59  * @tc.name: HksIpcSerializationTest.HksIpcSerializationTest002
60  * @tc.desc: tdd HksParamSetToParams, expect HKS_ERROR_PARAM_NOT_EXIST
61  * @tc.type: FUNC
62  */
HksIpcSerializationTest002()63 static void HksIpcSerializationTest002()
64 {
65     HKS_LOG_I("enter HksIpcSerializationTest002");
66     struct HksParamSet *paramSet = nullptr;
67     int32_t ret = HksInitParamSet(&paramSet);
68     const char *alias = "alias";
69     struct HksBlob aliasBlob = { .size = strlen(alias), .data = (uint8_t *)alias };
70     struct HksParamOut aliasOutParam = { .tag = HKS_TAG_ATTESTATION_ID_ALIAS, .blob = &aliasBlob };
71     ret = HksBuildParamSet(&paramSet);
72     ret = HksParamSetToParams(paramSet, &aliasOutParam, 1);
73     HksFreeParamSet(&paramSet);
74 }
75 
76 /**
77  * @tc.name: HksIpcSerializationTest.HksIpcSerializationTest003
78  * @tc.desc: tdd HksParamSetToParams, expect HKS_SUCCESS
79  * @tc.type: FUNC
80  */
HksIpcSerializationTest003()81 static void HksIpcSerializationTest003()
82 {
83     HKS_LOG_I("enter HksIpcSerializationTest003");
84     struct HksParamSet *paramSet = nullptr;
85     int32_t ret = HksInitParamSet(&paramSet);
86     const char *alias = "alias";
87     struct HksBlob aliasBlob = { .size = strlen(alias), .data = (uint8_t *)alias };
88     struct HksParamOut aliasOutParam = { .tag = HKS_TAG_ATTESTATION_ID_ALIAS, .blob = &aliasBlob };
89     struct HksParam aliasNullParam = { .tag = HKS_TAG_ATTESTATION_ID_ALIAS + HKS_PARAM_BUFFER_NULL_INTERVAL,
90         .blob = aliasBlob };
91     ret = HksAddParams(paramSet, &aliasNullParam, 1);
92     ret = HksBuildParamSet(&paramSet);
93     ret = HksParamSetToParams(paramSet, &aliasOutParam, 1);
94     HksFreeParamSet(&paramSet);
95 }
96 
97 /**
98  * @tc.name: HksIpcSerializationTest.HksIpcSerializationTest004
99  * @tc.desc: tdd HksParamSetToParams, expect HKS_SUCCESS
100  * @tc.type: FUNC
101  */
HksIpcSerializationTest004()102 static void HksIpcSerializationTest004()
103 {
104     HKS_LOG_I("enter HksIpcSerializationTest004");
105     struct HksParamSet *paramSet = nullptr;
106     int32_t ret = HksInitParamSet(&paramSet);
107     struct HksParam param = { .tag = HKS_TAG_KEY_AUTH_RESULT, .int32Param = 0 };
108     int32_t outParamInt = 1;
109     struct HksParamOut outParam = { .tag = HKS_TAG_KEY_AUTH_RESULT, .int32Param = &outParamInt };
110     ret = HksAddParams(paramSet, &param, 1);
111     ret = HksBuildParamSet(&paramSet);
112     ret = HksParamSetToParams(paramSet, &outParam, 1);
113     HksFreeParamSet(&paramSet);
114 }
115 
116 /**
117  * @tc.name: HksIpcSerializationTest.HksIpcSerializationTest005
118  * @tc.desc: tdd HksParamSetToParams, expect HKS_SUCCESS
119  * @tc.type: FUNC
120  */
HksIpcSerializationTest005()121 static void HksIpcSerializationTest005()
122 {
123     HKS_LOG_I("enter HksIpcSerializationTest005");
124     struct HksParamSet *paramSet = nullptr;
125     int32_t ret = HksInitParamSet(&paramSet);
126     struct HksParam param = { .tag = HKS_TAG_ACCESS_TIME, .uint32Param = 0 };
127     uint32_t outParamUint = 1;
128     struct HksParamOut outParam = { .tag = HKS_TAG_ACCESS_TIME, .uint32Param = &outParamUint };
129     ret = HksAddParams(paramSet, &param, 1);
130     ret = HksBuildParamSet(&paramSet);
131     ret = HksParamSetToParams(paramSet, &outParam, 1);
132     HksFreeParamSet(&paramSet);
133 }
134 
135 /**
136  * @tc.name: HksIpcSerializationTest.HksIpcSerializationTest006
137  * @tc.desc: tdd HksParamSetToParams, expect HKS_SUCCESS
138  * @tc.type: FUNC
139  */
HksIpcSerializationTest006()140 static void HksIpcSerializationTest006()
141 {
142     HKS_LOG_I("enter HksIpcSerializationTest006");
143     struct HksParamSet *paramSet = nullptr;
144     int32_t ret = HksInitParamSet(&paramSet);
145     struct HksParam param = { .tag = HKS_TAG_IF_NEED_APPEND_AUTH_INFO, .boolParam = true };
146     bool outParamBool = false;
147     struct HksParamOut outParam = { .tag = HKS_TAG_IF_NEED_APPEND_AUTH_INFO, .boolParam = &outParamBool };
148     ret = HksAddParams(paramSet, &param, 1);
149     ret = HksBuildParamSet(&paramSet);
150     ret = HksParamSetToParams(paramSet, &outParam, 1);
151     HksFreeParamSet(&paramSet);
152 }
153 
154 /**
155  * @tc.name: HksIpcSerializationTest.HksIpcSerializationTest007
156  * @tc.desc: tdd HksParamSetToParams, expect HKS_SUCCESS
157  * @tc.type: FUNC
158  */
HksIpcSerializationTest007()159 static void HksIpcSerializationTest007()
160 {
161     HKS_LOG_I("enter HksIpcSerializationTest007");
162     struct HksParamSet *paramSet = nullptr;
163     int32_t ret = HksInitParamSet(&paramSet);
164     struct HksParam param = { .tag = HKS_TAG_KEY_ACCESS_TIME, .uint64Param = 0 };
165     uint64_t outParamUint = 1;
166     struct HksParamOut outParam = { .tag = HKS_TAG_KEY_ACCESS_TIME, .uint64Param = &outParamUint };
167     ret = HksAddParams(paramSet, &param, 1);
168     ret = HksBuildParamSet(&paramSet);
169     ret = HksParamSetToParams(paramSet, &outParam, 1);
170     HksFreeParamSet(&paramSet);
171 }
172 
173 /**
174  * @tc.name: HksIpcSerializationTest.HksIpcSerializationTest008
175  * @tc.desc: tdd HksParamSetToParams, expect HKS_ERROR_INVALID_ARGUMENT
176  * @tc.type: FUNC
177  */
HksIpcSerializationTest008()178 static void HksIpcSerializationTest008()
179 {
180     HKS_LOG_I("enter HksIpcSerializationTest008");
181     struct HksParamSet *paramSet = nullptr;
182     int32_t ret = HksInitParamSet(&paramSet);
183     struct HksParam param = { .tag = HKS_TAG_KEY_ACCESS_TIME ^ HKS_TAG_TYPE_ULONG, .uint64Param = 0 };
184     uint64_t outParamUint = 1;
185     struct HksParamOut outParam = { .tag = HKS_TAG_KEY_ACCESS_TIME ^ HKS_TAG_TYPE_ULONG, .uint64Param = &outParamUint };
186     ret = HksAddParams(paramSet, &param, 1);
187     ret = HksBuildParamSet(&paramSet);
188     ret = HksParamSetToParams(paramSet, &outParam, 1);
189     HksFreeParamSet(&paramSet);
190 }
191 
192 /**
193  * @tc.name: HksIpcSerializationTest.HksIpcSerializationTest009
194  * @tc.desc: tdd HksParamSetToParams, expect HKS_ERROR_PARAM_NOT_EXIST
195  * @tc.type: FUNC
196  */
HksIpcSerializationTest009()197 static void HksIpcSerializationTest009()
198 {
199     HKS_LOG_I("enter HksIpcSerializationTest009");
200     struct HksParamSet *paramSet = nullptr;
201     int32_t ret = HksInitParamSet(&paramSet);
202     const char *alias = "alias";
203     struct HksBlob aliasBlob = { .size = strlen(alias), .data = (uint8_t *)alias };
204     struct HksParamOut aliasOutParam = { .tag = HKS_TAG_ATTESTATION_ID_ALIAS, .blob = &aliasBlob };
205     ret = HksBuildParamSet(&paramSet);
206     ret = HksParamSetToParams(paramSet, &aliasOutParam, 1);
207     HksFreeParamSet(&paramSet);
208 }
209 
210 /**
211  * @tc.name: HksIpcSerializationTest.HksIpcSerializationTest010
212  * @tc.desc: tdd GetBlobFromBuffer, expect HKS_ERROR_BUFFER_TOO_SMALL
213  * @tc.type: FUNC
214  */
HksIpcSerializationTest010()215 static void HksIpcSerializationTest010()
216 {
217     HKS_LOG_I("enter HksIpcSerializationTest010");
218     const uint32_t blobSize = 15;
219     const uint32_t srcBlobSize = 15;
220     uint32_t index = 16;
221     uint8_t blobData[blobSize] = { 0 };
222     uint8_t srcBlobData[srcBlobSize] = { 0 };
223     struct HksBlob blob = { .size = blobSize, .data = blobData };
224     struct HksBlob srcBlob = { .size = srcBlobSize, .data = srcBlobData };
225 
226     GetBlobFromBuffer(&blob, &srcBlob, &index);
227 }
228 
229 /**
230  * @tc.name: HksIpcSerializationTest.HksIpcSerializationTest011
231  * @tc.desc: tdd GetBlobFromBuffer, expect HKS_ERROR_BUFFER_TOO_SMALL
232  * @tc.type: FUNC
233  */
HksIpcSerializationTest011()234 static void HksIpcSerializationTest011()
235 {
236     HKS_LOG_I("enter HksIpcSerializationTest011");
237     const uint32_t blobSize = 15;
238     const uint32_t srcBlobSize = 15;
239     uint32_t index = 15;
240     uint8_t blobData[blobSize] = { 0 };
241     uint8_t srcBlobData[srcBlobSize] = { 0 };
242     struct HksBlob blob = { .size = blobSize, .data = blobData };
243     struct HksBlob srcBlob = { .size = srcBlobSize, .data = srcBlobData };
244 
245     GetBlobFromBuffer(&blob, &srcBlob, &index);
246 }
247 
HksIpcServiceTest001()248 static void HksIpcServiceTest001()
249 {
250     HKS_LOG_I("enter HksIpcServiceTest001");
251     uint8_t data[] = {
252         0x20, 0x00, 0x00, 0x00, 0x41, 0x54, 0x5f, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x75, 0x61, 0x77, 0x65,
253         0x69, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73,
254         0x61, 0x5f, 0x43, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20,
255         0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
256         0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
257         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20,
258         0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
259         0x00, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
260     };
261     const struct HksBlob srcData = {
262         .size = sizeof(data) / sizeof(data[0]),
263         .data = data
264     };
265     MessageParcel reply;
266     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
267     HksIpcServiceGenerateKey(&srcData, context);
268 }
269 
HksIpcServiceTest002()270 static void HksIpcServiceTest002()
271 {
272     HKS_LOG_I("enter HksIpcServiceTest002");
273     uint8_t data[] = {
274         0x10, 0x00, 0x00, 0x00, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f,
275         0x6b, 0x65, 0x79, 0x00, 0x98, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20,
276         0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
277         0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
278         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20,
279         0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
280         0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
281         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20,
282         0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
283         0x00, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
284         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
285         0x28, 0x5e, 0xe2, 0x1e, 0xfe, 0x92, 0x61, 0x3d, 0xe2, 0xdf, 0x3e, 0x49, 0xbb, 0x50, 0x91, 0xc9
286     };
287     const struct HksBlob srcData = {
288         .size = sizeof(data) / sizeof(data[0]),
289         .data = data
290     };
291     MessageParcel reply;
292     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
293     HksIpcServiceImportKey(&srcData, context);
294 }
295 
HksIpcServiceTest003()296 static void HksIpcServiceTest003()
297 {
298     HKS_LOG_I("enter HksIpcServiceTest003");
299     uint8_t data[] = {
300         0x1b, 0x00, 0x00, 0x00, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f,
301         0x6b, 0x65, 0x79, 0x5f, 0x65, 0x63, 0x64, 0x68, 0x5f, 0x61, 0x65, 0x73, 0x32, 0x35, 0x36, 0x00,
302         0x1c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e,
303         0x67, 0x4b, 0x65, 0x79, 0x5f, 0x65, 0x63, 0x64, 0x68, 0x5f, 0x61, 0x65, 0x73, 0x32, 0x35, 0x36,
304         0xf0, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
305         0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
306         0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
307         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
308         0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
309         0x05, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
310         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
311         0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
312         0x04, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
313         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
314         0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
315         0x0a, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
316         0xe0, 0xb4, 0x49, 0xc3, 0x5a, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
317         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
318         0x62, 0x61, 0x62, 0x61, 0x62, 0x61, 0x62, 0x61, 0x62, 0x61, 0x62, 0x61, 0x62, 0x61, 0x62, 0x00,
319         0x17, 0x01, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86,
320         0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03,
321         0x42, 0x00, 0x04, 0x1a, 0xa6, 0x1b, 0xdd, 0x17, 0xcc, 0xd9, 0x4d, 0x41, 0xb5, 0x4b, 0xbd, 0xad,
322         0xee, 0xef, 0xe3, 0x1a, 0x6b, 0x47, 0x87, 0x7f, 0xcb, 0x73, 0xe7, 0x51, 0xef, 0x80, 0x37, 0x89,
323         0xf2, 0xd4, 0x9d, 0x85, 0xe0, 0xe9, 0x00, 0x74, 0x50, 0xa8, 0x3e, 0x58, 0xcb, 0xe5, 0x0f, 0x4b,
324         0x18, 0x13, 0xae, 0x7b, 0x90, 0x7f, 0x7c, 0x20, 0x06, 0xb4, 0xc0, 0x68, 0x0f, 0xf8, 0x69, 0xe2,
325         0xd0, 0x14, 0x6d, 0x10, 0x00, 0x00, 0x00, 0x61, 0x62, 0x61, 0x62, 0x61, 0x62, 0x61, 0x62, 0x61,
326         0x62, 0x61, 0x62, 0x61, 0x62, 0x61, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x68, 0x61, 0x68, 0x61, 0x68,
327         0x61, 0x68, 0x61, 0x68, 0x61, 0x68, 0x00, 0x10, 0x00, 0x00, 0x00, 0x4a, 0xb7, 0x6f, 0xf0, 0xf4,
328         0x1c, 0x75, 0x35, 0x79, 0x35, 0xc6, 0x9f, 0x51, 0xa6, 0xda, 0x7f, 0x20, 0x00, 0x00, 0x00, 0x79,
329         0x44, 0x74, 0x06, 0x18, 0x78, 0xea, 0x3d, 0x53, 0xf3, 0x5d, 0xbf, 0xbc, 0x2c, 0x0b, 0x0d, 0xe6,
330         0xbd, 0x28, 0x23, 0xee, 0x83, 0x97, 0xe2, 0xe3, 0x45, 0x7a, 0xc3, 0x44, 0xe6, 0x0d, 0x1a, 0x10,
331         0x00, 0x00, 0x00, 0x61, 0x62, 0x61, 0x62, 0x61, 0x62, 0x61, 0x62, 0x61, 0x62, 0x61, 0x62, 0x61,
332         0x62, 0x61, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x68, 0x61, 0x68, 0x61, 0x68, 0x61, 0x68, 0x61, 0x68,
333         0x61, 0x68, 0x00, 0x10, 0x00, 0x00, 0x00, 0xef, 0x45, 0xce, 0x59, 0xdd, 0x7a, 0xc4, 0xb7, 0xbb,
334         0x79, 0xdc, 0x94, 0x1e, 0x7c, 0x2f, 0xe3, 0x04, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18,
335         0x00, 0x00, 0x00, 0xf4, 0x17, 0xb7, 0xc3, 0xc9, 0x6e, 0x3d, 0x7f, 0x91, 0x01, 0x42, 0x53, 0x74,
336         0xac, 0xc0, 0x86, 0x9c, 0x41, 0x2e, 0x66, 0xa5, 0x62, 0x76, 0x42, 0x00
337     };
338     const struct HksBlob srcData = {
339         .size = sizeof(data) / sizeof(data[0]),
340         .data = data
341     };
342     MessageParcel reply;
343     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
344     HksIpcServiceImportWrappedKey(&srcData, context);
345 }
346 
HksIpcServiceTest004()347 static void HksIpcServiceTest004()
348 {
349     HKS_LOG_I("enter HksIpcServiceTest004");
350     uint8_t data[] = {
351         0x1c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e,
352         0x67, 0x4b, 0x65, 0x79, 0x5f, 0x65, 0x63, 0x64, 0x68, 0x5f, 0x61, 0x65, 0x73, 0x32, 0x35, 0x36,
353         0x00, 0x08, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x20,
354         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
355         0x00, 0x00, 0x00, 0x00
356     };
357     const struct HksBlob srcData = {
358         .size = sizeof(data) / sizeof(data[0]),
359         .data = data
360     };
361     MessageParcel reply;
362     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
363     HksIpcServiceExportPublicKey(&srcData, context);
364 }
365 
HksIpcServiceTest005()366 static void HksIpcServiceTest005()
367 {
368     HKS_LOG_I("enter HksIpcServiceTest005");
369     uint8_t data[] = {
370         0x10, 0x00, 0x00, 0x00, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f,
371         0x6b, 0x65, 0x79, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x20,
372         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
373         0x00, 0x00, 0x00, 0x00
374     };
375     const struct HksBlob srcData = {
376         .size = sizeof(data) / sizeof(data[0]),
377         .data = data
378     };
379     MessageParcel reply;
380     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
381     HksIpcServiceDeleteKey(&srcData, context);
382 }
383 
HksIpcServiceTest006()384 static void HksIpcServiceTest006()
385 {
386     HKS_LOG_I("enter HksIpcServiceTest006");
387     uint8_t data[] = {
388         0x14, 0x00, 0x00, 0x00, 0x70, 0x75, 0x73, 0x68, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x53, 0x69, 0x67,
389         0x6e, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
390         0x3c, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
391         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
392     };
393     const struct HksBlob srcData = {
394         .size = sizeof(data) / sizeof(data[0]),
395         .data = data
396     };
397     MessageParcel reply;
398     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
399     HksIpcServiceGetKeyParamSet(&srcData, context);
400 }
401 
HksIpcServiceTest007()402 static void HksIpcServiceTest007()
403 {
404     HKS_LOG_I("enter HksIpcServiceTest007");
405     uint8_t data[] = {
406         0x14, 0x00, 0x00, 0x00, 0x70, 0x75, 0x73, 0x68, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x53, 0x69, 0x67,
407         0x6e, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x69, 0x72, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
408         0x3c, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
409         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
410     };
411     const struct HksBlob srcData = {
412         .size = sizeof(data) / sizeof(data[0]),
413         .data = data
414     };
415     MessageParcel reply;
416     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
417     HksIpcServiceKeyExist(&srcData, context);
418 }
419 
HksIpcServiceTest008()420 static void HksIpcServiceTest008()
421 {
422     HKS_LOG_I("enter HksIpcServiceTest008");
423     uint8_t data[] = {
424         0x10, 0x00, 0x00, 0x00
425     };
426     const struct HksBlob srcData = {
427         .size = sizeof(data) / sizeof(data[0]),
428         .data = data
429     };
430     MessageParcel reply;
431     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
432     HksIpcServiceGenerateRandom(&srcData, context);
433 }
434 
HksIpcServiceTest009()435 static void HksIpcServiceTest009()
436 {
437     HKS_LOG_I("enter HksIpcServiceTest009");
438     uint8_t data[] = {
439         0x1f, 0x00, 0x00, 0x00, 0x48, 0x6b, 0x73, 0x45, 0x43, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x56, 0x65,
440         0x72, 0x69, 0x66, 0x79, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x54, 0x65, 0x73, 0x74,
441         0x30, 0x31, 0x30, 0x00, 0x80, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20,
442         0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
443         0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
444         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20,
445         0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
446         0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
447         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x20,
448         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
449         0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x48, 0x6b, 0x73, 0x5f, 0x45, 0x43, 0x43, 0x5f,
450         0x53, 0x69, 0x67, 0x6e, 0x5f, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x54, 0x65, 0x73, 0x74,
451         0x5f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
452         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
453         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
454         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
455         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
456         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
457         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
458         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
459         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
460         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
461         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
462         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
463         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
464         0x30, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x00, 0x04, 0x00, 0x00
465     };
466     const struct HksBlob srcData = {
467         .size = sizeof(data) / sizeof(data[0]),
468         .data = data
469     };
470     MessageParcel reply;
471     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
472     HksIpcServiceSign(&srcData, context);
473 }
474 
HksIpcServiceTest010()475 static void HksIpcServiceTest010()
476 {
477     HKS_LOG_I("enter HksIpcServiceTest010");
478     uint8_t data[] = {
479         0x1f, 0x00, 0x00, 0x00, 0x45, 0x43, 0x43, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x5f, 0x56, 0x65, 0x72,
480         0x69, 0x66, 0x79, 0x5f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x4b, 0x65, 0x79, 0x41, 0x6c,
481         0x69, 0x61, 0x73, 0x00, 0x80, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20,
482         0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
483         0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
484         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20,
485         0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
486         0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
487         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x20,
488         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
489         0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x48, 0x6b, 0x73, 0x5f, 0x45, 0x43, 0x43, 0x5f,
490         0x53, 0x69, 0x67, 0x6e, 0x5f, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x54, 0x65, 0x73, 0x74,
491         0x5f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
492         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
493         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
494         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
495         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
496         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
497         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
498         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
499         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
500         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
501         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
502         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
503         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
504         0x30, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x00, 0x00, 0x30, 0x46, 0x02, 0x21,
505         0x00, 0xc0, 0x77, 0x92, 0xea, 0xd7, 0xa9, 0xe9, 0xeb, 0x9c, 0xce, 0x5f, 0xc8, 0x26, 0x17, 0x6b,
506         0x9b, 0x59, 0x7f, 0x68, 0x2a, 0xa3, 0x6d, 0xb4, 0x45, 0x82, 0x89, 0x2c, 0x82, 0x6f, 0x2f, 0x25,
507         0xa2, 0x02, 0x21, 0x00, 0xfc, 0x2b, 0x05, 0xad, 0xcd, 0x31, 0xa8, 0x7e, 0xb0, 0x43, 0xe7, 0xe7,
508         0x8b, 0x93, 0xf7, 0x5d, 0xc4, 0x9f, 0x2b, 0x46, 0x92, 0xa9, 0x09, 0x21, 0xd9, 0x7b, 0x50, 0x5a,
509         0x43, 0xef, 0xde, 0xb1
510     };
511     const struct HksBlob srcData = {
512         .size = sizeof(data) / sizeof(data[0]),
513         .data = data
514     };
515     MessageParcel reply;
516     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
517     HksIpcServiceVerify(&srcData, context);
518 }
519 
HksIpcServiceTest011()520 static void HksIpcServiceTest011()
521 {
522     HKS_LOG_I("enter HksIpcServiceTest011");
523     uint8_t data[] = {
524         0x17, 0x00, 0x00, 0x00, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x5f,
525         0x64, 0x62, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x00, 0xff, 0x00, 0x00, 0x00,
526         0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
527         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x20,
528         0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
529         0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
530         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20,
531         0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
532         0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
533         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x50,
534         0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xc8, 0x3d, 0x2a,
535         0x5b, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
536         0x00, 0x00, 0x00, 0x00, 0xf0, 0xc8, 0x3d, 0x2a, 0x5b, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x20,
537         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
538         0x00, 0x00, 0x00, 0x00, 0x18, 0x27, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
539         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5a, 0x35, 0x73, 0x30,
540         0x42, 0x6f, 0x35, 0x37, 0x31, 0x4b, 0x6f, 0x71, 0x77, 0x49, 0x69, 0x36, 0x64, 0x69, 0x73, 0x74,
541         0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x64, 0x61, 0x74, 0x61, 0x00, 0x20, 0x00, 0x00, 0x00,
542         0x7c, 0xe5, 0xf3, 0xb0, 0x76, 0x35, 0xf1, 0xc8, 0x01, 0x9f, 0x29, 0xc7, 0xec, 0x4a, 0xac, 0x06,
543         0x3f, 0x8b, 0x86, 0x97, 0x1b, 0x83, 0x77, 0x4d, 0xf6, 0xbd, 0x83, 0x77, 0x1c, 0x41, 0x97, 0x05,
544         0x00, 0x01, 0x00, 0x00
545     };
546     const struct HksBlob srcData = {
547         .size = sizeof(data) / sizeof(data[0]),
548         .data = data
549     };
550     MessageParcel reply;
551     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
552     HksIpcServiceEncrypt(&srcData, context);
553 }
554 
HksIpcServiceTest012()555 static void HksIpcServiceTest012()
556 {
557     HKS_LOG_I("enter HksIpcServiceTest012");
558     uint8_t data[] = {
559         0x1d, 0x00, 0x00, 0x00, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x64,
560         0x62, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x6b, 0x65,
561         0x79, 0x00, 0x00, 0x00, 0x2e, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20,
562         0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
563         0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
564         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20,
565         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
566         0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
567         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x20,
568         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
569         0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
570         0x00, 0x00, 0x00, 0x00, 0xf8, 0x7c, 0x15, 0x38, 0x5b, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x50,
571         0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x7d, 0x15, 0x38,
572         0x5b, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
573         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x27, 0x00, 0x50,
574         0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x7d, 0x15, 0x38,
575         0x5b, 0x00, 0x00, 0x00, 0x18, 0x27, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
576         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5a, 0x35, 0x73, 0x30,
577         0x42, 0x6f, 0x35, 0x37, 0x31, 0x4b, 0x6f, 0x71, 0x77, 0x49, 0x69, 0x36, 0x64, 0x69, 0x73, 0x74,
578         0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x6c, 0x69, 0x65,
579         0x6e, 0x74, 0x83, 0x92, 0x78, 0x29, 0x65, 0x15, 0x23, 0xe9, 0xfe, 0x9b, 0x33, 0xd3, 0x67, 0x5e,
580         0xd4, 0x69, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xf2, 0x2a, 0x08, 0x30, 0xa7, 0x65, 0xe5, 0xb3,
581         0x2f, 0xe9, 0xf4, 0x7d, 0xc0, 0x86, 0x38, 0x59, 0x63, 0x8a, 0x97, 0x04, 0x88, 0xec, 0x3b, 0x11,
582         0x09, 0x64, 0x53, 0x8f, 0x37, 0x6b, 0xe2, 0xbe, 0x83, 0x92, 0x78, 0x29, 0x65, 0x15, 0x23, 0xe9,
583         0xfe, 0x9b, 0x33, 0xd3, 0x67, 0x5e, 0xd4, 0x69, 0x00, 0x01, 0x00, 0x00
584     };
585     const struct HksBlob srcData = {
586         .size = sizeof(data) / sizeof(data[0]),
587         .data = data
588     };
589     MessageParcel reply;
590     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
591     HksIpcServiceDecrypt(&srcData, context);
592 }
593 
HksIpcServiceTest013()594 static void HksIpcServiceTest013()
595 {
596     HKS_LOG_I("enter HksIpcServiceTest013");
597     uint8_t data[] = {
598         0x68, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
599         0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
600         0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
601         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
602         0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
603         0x3c, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
604         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x74, 0x65, 0x73, 0x74,
605         0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x65, 0x63, 0x64, 0x68,
606         0x5f, 0x61, 0x65, 0x73, 0x32, 0x35, 0x36, 0x00, 0x54, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
607         0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
608         0x22, 0x3a, 0x27, 0xf9, 0xa7, 0xae, 0xa8, 0x00, 0x3b, 0x51, 0x87, 0x02, 0x52, 0x02, 0xe5, 0x68,
609         0x85, 0x3f, 0xcc, 0x9c, 0x7e, 0x18, 0x94, 0x10, 0x9c, 0xcd, 0x42, 0xae, 0xe8, 0xa3, 0xcf, 0xb3,
610         0xe4, 0x6a, 0x1b, 0x66, 0x66, 0x65, 0x4c, 0xec, 0x66, 0x4b, 0x50, 0x10, 0xc2, 0xa5, 0xaa, 0xc4,
611         0xbd, 0xab, 0x5e, 0xf9, 0x85, 0xca, 0xe6, 0x29, 0x4a, 0xf6, 0xbc, 0x72, 0xfb, 0xba, 0x67, 0xa6,
612         0x20, 0x00, 0x00, 0x00
613     };
614     const struct HksBlob srcData = {
615         .size = sizeof(data) / sizeof(data[0]),
616         .data = data
617     };
618     MessageParcel reply;
619     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
620     HksIpcServiceAgreeKey(&srcData, context);
621 }
622 
HksIpcServiceTest014()623 static void HksIpcServiceTest014()
624 {
625     HKS_LOG_I("enter HksIpcServiceTest014");
626     uint8_t data[] = {
627         0xa3, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
628         0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
629         0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
630         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
631         0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
632         0x18, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
633         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00,
634         0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0xcc, 0x69, 0x93, 0x59, 0x00, 0x00, 0x00,
635         0x3c, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
636         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x68, 0x65, 0x20, 0x66, 0x61, 0x63, 0x74,
637         0x6f, 0x72, 0x31, 0x00, 0x18, 0x00, 0x00, 0x00, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x6d, 0x70,
638         0x6f, 0x72, 0x74, 0x5f, 0x6b, 0x65, 0x6b, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x30, 0x32,
639         0x10, 0x00, 0x00, 0x00
640     };
641     const struct HksBlob srcData = {
642         .size = sizeof(data) / sizeof(data[0]),
643         .data = data
644     };
645     MessageParcel reply;
646     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
647     HksIpcServiceDeriveKey(&srcData, context);
648 }
649 
HksIpcServiceTest015()650 static void HksIpcServiceTest015()
651 {
652     HKS_LOG_I("enter HksIpcServiceTest015");
653     uint8_t data[] = {
654         0x19, 0x00, 0x00, 0x00, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x5f,
655         0x6b, 0x65, 0x79, 0x32, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x30, 0x32, 0x00, 0x00, 0x00,
656         0xc0, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
657         0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
658         0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
659         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
660         0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
661         0x04, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
662         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
663         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
664         0x0a, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
665         0xb0, 0xcc, 0x69, 0x93, 0x59, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
666         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
667         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
668         0x20, 0x00, 0x00, 0x00, 0xea, 0x67, 0x5e, 0xee, 0x1d, 0xa9, 0xc5, 0x61, 0x25, 0xc3, 0xd4, 0xae,
669         0x23, 0x74, 0x2a, 0x05, 0xc4, 0x1f, 0xbf, 0x57, 0x44, 0x70, 0x72, 0xb1, 0x9a, 0xcd, 0x5d, 0xe4,
670         0x4c, 0x76, 0x39, 0xb4, 0x00, 0x01, 0x00, 0x00
671     };
672     const struct HksBlob srcData = {
673         .size = sizeof(data) / sizeof(data[0]),
674         .data = data
675     };
676     MessageParcel reply;
677     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
678     HksIpcServiceMac(&srcData, context);
679 }
680 
HksIpcServiceTest016()681 static void HksIpcServiceTest016()
682 {
683     HKS_LOG_I("enter HksIpcServiceTest016");
684     uint8_t data[] = {
685         0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
686         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
687         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
688         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
689         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
690         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
691         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
692         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
693         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
694         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
695         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
696         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
697         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
698         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
699         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
700         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
701         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
702         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
703         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
704         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
705         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
706         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
707         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
708         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
709         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
710         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
711         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
712         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
713         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
714         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
715         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
716         0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
717         0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
718     };
719     const struct HksBlob srcData = {
720         .size = sizeof(data) / sizeof(data[0]),
721         .data = data
722     };
723     MessageParcel reply;
724     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
725     HksIpcServiceGetKeyInfoList(&srcData, context);
726 }
727 
HksIpcServiceTest017()728 static void HksIpcServiceTest017()
729 {
730     HKS_LOG_I("enter HksIpcServiceTest017");
731     uint8_t data[] = {
732         0x20, 0x00, 0x00, 0x00, 0x41, 0x54, 0x5f, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x75, 0x61, 0x77, 0x65,
733         0x69, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73,
734         0x61, 0x5f, 0x43, 0x4e, 0xf1, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x50,
735         0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x54, 0x5c, 0xfd,
736         0x5a, 0x00, 0x00, 0x00, 0xf5, 0x01, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
737         0x00, 0x00, 0x00, 0x00, 0xae, 0x54, 0x5c, 0xfd, 0x5a, 0x00, 0x00, 0x00, 0x03, 0x02, 0x00, 0x50,
738         0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x54, 0x5c, 0xfd,
739         0x5a, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
740         0x00, 0x00, 0x00, 0x00, 0xd1, 0x54, 0x5c, 0xfd, 0x5a, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x20,
741         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
742         0x00, 0x00, 0x00, 0x00, 0x05, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
743         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x69, 0x5f, 0x73,
744         0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x69, 0x6e,
745         0x66, 0x6f, 0x68, 0x69, 0x5f, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x5f, 0x64,
746         0x61, 0x74, 0x61, 0x68, 0x69, 0x5f, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
747         0x5f, 0x64, 0x61, 0x74, 0x61, 0x41, 0x54, 0x5f, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x75, 0x61, 0x77,
748         0x65, 0x69, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
749         0x73, 0x61, 0x5f, 0x43, 0x4e, 0x00, 0x00, 0x00, 0x10, 0x30, 0x00, 0x00
750     };
751     const struct HksBlob srcData = {
752         .size = sizeof(data) / sizeof(data[0]),
753         .data = data
754     };
755     MessageParcel reply;
756     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
757     HksIpcServiceAttestKey(&srcData, context, NULL);
758 }
759 
HksIpcServiceTest018()760 static void HksIpcServiceTest018()
761 {
762     HKS_LOG_I("enter HksIpcServiceTest018");
763     uint8_t data[] = {
764         0xd4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x31, 0x75, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00,
765         0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xc4, 0xc9, 0xab, 0x5a, 0x00, 0x00, 0x00,
766         0x32, 0x75, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
767         0x54, 0xc4, 0xc9, 0xab, 0x5a, 0x00, 0x00, 0x00, 0x48, 0x6b, 0x73, 0x48, 0x4b, 0x44, 0x46, 0x44,
768         0x65, 0x72, 0x69, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x54, 0x65, 0x73,
769         0x74, 0x30, 0x30, 0x34, 0x80, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20,
770         0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
771         0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
772         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20,
773         0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
774         0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
775         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x20,
776         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
777         0x00, 0x00, 0x00, 0x00
778     };
779     const struct HksBlob paramSetBlob = {
780         .size = sizeof(data) / sizeof(data[0]),
781         .data = data
782     };
783     MessageParcel reply;
784     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
785     const uint32_t len = 40;
786     uint8_t data1[len] = { 0 };
787     struct HksBlob outData = {
788         .size = len,
789         .data = data1
790     };
791     HksIpcServiceInit(&paramSetBlob, &outData, context);
792 }
793 
HksIpcServiceTest019()794 static void HksIpcServiceTest019()
795 {
796     HKS_LOG_I("enter HksIpcServiceTest019");
797     uint8_t data[] = {
798         0xc8, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x31, 0x75, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00,
799         0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0xcc, 0xc9, 0xab, 0x5a, 0x00, 0x00, 0x00,
800         0x32, 0x75, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
801         0xd0, 0xcc, 0xc9, 0xab, 0x5a, 0x00, 0x00, 0x00, 0x33, 0x75, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00,
802         0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0xcc, 0xc9, 0xab, 0x5a, 0x00, 0x00, 0x00,
803         0x80, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
804         0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
805         0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
806         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
807         0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
808         0x18, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
809         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
810         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
811         0x02, 0x1a, 0x1d, 0x77, 0x00, 0x00, 0x00, 0x00, 0x48, 0x6b, 0x73, 0x5f, 0x48, 0x4b, 0x44, 0x46,
812         0x5f, 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, 0x5f, 0x54, 0x65, 0x73, 0x74, 0x5f, 0x30, 0x30, 0x30,
813         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
814         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
815         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
816         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
817         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
818         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
819         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
820         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
821         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
822         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
823         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
824         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
825         0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
826         0x30, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67
827     };
828     const struct HksBlob paramSetBlob = {
829         .size = sizeof(data) / sizeof(data[0]),
830         .data = data
831     };
832     MessageParcel reply;
833     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
834     const uint32_t len = 2048;
835     uint8_t data1[len] = { 0 };
836     struct HksBlob outData = {
837         .size = len,
838         .data = data1
839     };
840     HksIpcServiceUpdate(&paramSetBlob, &outData, context);
841 }
842 
843 uint8_t finishData[] = {
844     0xd8, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x31, 0x75, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00,
845     0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x7c, 0xf1, 0x42, 0x5c, 0x00, 0x00, 0x00,
846     0x32, 0x75, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
847     0xd0, 0x7c, 0xf1, 0x42, 0x5c, 0x00, 0x00, 0x00, 0x33, 0x75, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00,
848     0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x7c, 0xf1, 0x42, 0x5c, 0x00, 0x00, 0x00,
849     0x80, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
850     0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
851     0x03, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
852     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
853     0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
854     0x05, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
855     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
856     0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
857     0xf3, 0xcd, 0x0a, 0x99, 0x00, 0x00, 0x00, 0x00, 0x27, 0x70, 0x53, 0xc5, 0xd1, 0x0b, 0x08, 0x57,
858     0x3e, 0xba, 0xca, 0x20, 0x69, 0x5e, 0x1b, 0xb8, 0xc1, 0x17, 0x3d, 0x7d, 0x9c, 0x01, 0xd1, 0xe0,
859     0x71, 0xfc, 0x5e, 0x6f, 0xd2, 0xa2, 0xab, 0xa8, 0xf5, 0x06, 0xb9, 0xb7, 0x6c, 0x32, 0x40, 0x73,
860     0x7f, 0x95, 0xbb, 0x72, 0x8e, 0x8c, 0x3b, 0xdb, 0xcd, 0x41, 0x09, 0xb7, 0x14, 0x61, 0xb6, 0x5c,
861     0x4c, 0x59, 0x0e, 0x50, 0xd6, 0xae, 0x56, 0xad, 0xbd, 0x6f, 0x34, 0x5b, 0xea, 0x3c, 0x14, 0xc8,
862     0xa2, 0x8b, 0xd1, 0xda, 0xe0, 0x8d, 0xca, 0xec, 0xbd, 0x85, 0xa7, 0xd0, 0x7c, 0xb6, 0xcb, 0x7a,
863     0x88, 0x60, 0x15, 0x39, 0x88, 0x85, 0x40, 0xf0, 0xa1, 0x4f, 0xb2, 0x97, 0x08, 0x97, 0x8f, 0x91,
864     0x26, 0x73, 0xe7, 0x7c, 0x1e, 0xd9, 0x40, 0x50, 0x76, 0x60, 0xc6, 0xc6, 0x7f, 0x85, 0xf0, 0x99,
865     0x77, 0xaf, 0x3a, 0x1a, 0x7e, 0xbd, 0x15, 0x82, 0xef, 0xa7, 0x12, 0x8b, 0x8c, 0x6f, 0xca, 0x9f,
866     0x61, 0xb7, 0x10, 0xb5, 0x20, 0x46, 0xae, 0xdf, 0x40, 0xe0, 0xd3, 0x79, 0x96, 0xbd, 0x2d, 0xa0,
867     0xda, 0xf1, 0x91, 0x84, 0x24, 0xa4, 0x7d, 0xbf, 0x3b, 0x95, 0xb5, 0xf3, 0xdd, 0x20, 0x98, 0x17,
868     0x5f, 0x27, 0xb7, 0x87, 0x39, 0xdb, 0x26, 0x65, 0xd9, 0x67, 0x2f, 0xcd, 0x5c, 0x88, 0x79, 0x40,
869     0xa9, 0x63, 0x1f, 0x64, 0x05, 0xed, 0x80, 0x9f, 0xc7, 0x6a, 0x0f, 0xd3, 0xac, 0xa7, 0x2d, 0xf0,
870     0x6a, 0x87, 0xfb, 0x4e, 0x80, 0xa0, 0x59, 0xf3, 0x07, 0xbf, 0x2a, 0x42, 0xb0, 0x6f, 0x7e, 0xa2,
871     0xbd, 0xa9, 0xcf, 0x19, 0xd0, 0x7c, 0x46, 0x36, 0x1a, 0x9e, 0xdc, 0x62, 0x79, 0x95, 0x8b, 0x2b,
872     0x38, 0x22, 0x88, 0x7d, 0x4f, 0x3a, 0xca, 0xd2, 0x18, 0xf4, 0x61, 0x11, 0xdb, 0x9b, 0xe1, 0x7a,
873     0x31, 0xa1, 0x84, 0xcd, 0x7f, 0xa3, 0x9f, 0x8b, 0xd2, 0xa0, 0x68, 0xd7, 0xc0, 0x77, 0x83, 0x0d,
874     0x0e, 0x0f, 0xae, 0xfb, 0xc1, 0x0c, 0xd2, 0x26, 0xea, 0x77, 0x46, 0x1d, 0xab, 0xa1, 0x32, 0x81,
875     0x7d, 0xf6, 0xc2, 0x00, 0x38, 0x3a, 0x7f, 0x7c, 0x24, 0xbf, 0xc1, 0x6d, 0xf1, 0xcb, 0x99, 0x04,
876     0x6e, 0x18, 0xa2, 0x95, 0x00, 0xff, 0x74, 0xbe, 0x79, 0xe3, 0x2d, 0x82, 0x2c, 0xf4, 0x5b, 0xd2,
877     0xbc, 0xed, 0x45, 0x27, 0x7e, 0xff, 0x16, 0x53, 0xd6, 0xff, 0x38, 0xfd, 0x35, 0x93, 0xe1, 0x79,
878     0x9e, 0xc1, 0xcc, 0xf0, 0xd0, 0xa9, 0x86, 0xc6, 0x52, 0x8c, 0x8f, 0x76, 0xbd, 0x9f, 0x97, 0xd1,
879     0xd1, 0x71, 0x30, 0x21, 0xbb, 0x84, 0x52, 0xee, 0xbe, 0xea, 0xbd, 0x47, 0x90, 0xdc, 0xff, 0x11,
880     0xed, 0x61, 0x92, 0xd1, 0xcf, 0xc3, 0x62, 0xc4, 0xb4, 0x4e, 0xd2, 0x80, 0x3f, 0xdf, 0x04, 0xc4,
881     0x49, 0x05, 0xdb, 0x22, 0xea, 0x32, 0x64, 0x7d, 0x90, 0x96, 0x7f, 0xd3, 0xb9, 0x3b, 0x36, 0x38,
882     0xc8, 0x0b, 0x09, 0x7e, 0x44, 0x5e, 0x4c, 0xa9, 0xfc, 0x31, 0x4d, 0x89, 0x36, 0x14, 0xa0, 0x26,
883     0x6e, 0xeb, 0x5b, 0xa6, 0x9a, 0xcc, 0x96, 0x58, 0x23, 0x59, 0x5e, 0xe1, 0x81, 0x1c, 0x29, 0xc7,
884     0x63, 0xd8, 0xcc, 0xd6, 0x34, 0x06, 0xc4, 0x83, 0xc2, 0xa1, 0xd7, 0xa6, 0x66, 0xd2, 0xbb, 0x78,
885     0xc5, 0x0a, 0x17, 0x48, 0x8b, 0xaa, 0x47, 0xf8, 0x42, 0x06, 0xd9, 0x0c, 0x7d, 0x62, 0xae, 0x80,
886     0xcf, 0xe3, 0x1c, 0x1f, 0xa7, 0x24, 0xb0, 0x61, 0x71, 0x6a, 0x9e, 0xc7, 0xe0, 0x6d, 0xda, 0xd4,
887     0x1d, 0xfc, 0xac, 0x23, 0x95, 0xca, 0x29, 0x34, 0x15, 0xcf, 0x4b, 0x6f, 0x13, 0x5f, 0x47, 0x4c,
888     0x96, 0xcf, 0xd1, 0x39, 0x66, 0x75, 0x84, 0xa2, 0x74, 0x03, 0xb5, 0x98, 0x2b, 0x9d, 0x0a, 0x2b,
889     0x64, 0x1b, 0xb1, 0x4b, 0x32, 0xb2, 0x46, 0xf8
890 };
HksIpcServiceTest020()891 static void HksIpcServiceTest020()
892 {
893     HKS_LOG_I("enter HksIpcServiceTest020");
894     const struct HksBlob paramSetBlob = {
895         .size = sizeof(finishData) / sizeof(finishData[0]),
896         .data = finishData
897     };
898     MessageParcel reply;
899     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
900     const uint32_t len = 66048;
901     uint8_t data1[len] = { 0 };
902     struct HksBlob outData = {
903         .size = len,
904         .data = data1
905     };
906     HksIpcServiceFinish(&paramSetBlob, &outData, context);
907 }
908 
HksIpcServiceTest021()909 static void HksIpcServiceTest021()
910 {
911     HKS_LOG_I("enter HksIpcServiceTest021");
912     uint8_t data[] = {
913         0xa8, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x31, 0x75, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00,
914         0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xcc, 0x69, 0x93, 0x59, 0x00, 0x00, 0x00,
915         0x32, 0x75, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
916         0xa0, 0xcc, 0x69, 0x93, 0x59, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
917         0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
918         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
919         0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
920         0x03, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
921         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
922         0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
923         0x41, 0x64, 0xbf, 0x63, 0x00, 0x00, 0x00, 0x00
924     };
925     const struct HksBlob paramSetBlob = {
926         .size = sizeof(data) / sizeof(data[0]),
927         .data = data
928     };
929     MessageParcel reply;
930     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
931     struct HksBlob outData = {
932         .size = 0,
933         .data = NULL
934     };
935     HksIpcServiceAbort(&paramSetBlob, &outData, context);
936 }
937 
HksIpcServiceTest022()938 static void HksIpcServiceTest022()
939 {
940     HKS_LOG_I("enter HksIpcServiceTest022");
941     uint8_t data[] = {
942         0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
943     };
944     const struct HksBlob srcData = {
945         .size = sizeof(data) / sizeof(data[0]),
946         .data = data
947     };
948     MessageParcel reply;
949     uint8_t *context = reinterpret_cast<uint8_t *>(&reply);
950     HksIpcServiceListAliases(&srcData, context);
951 }
952 }
953 }
954 }
955 
LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)956 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
957 {
958     (void)data;
959     (void)size;
960     OHOS::Security::Hks::HksIpcSerializationTest001();
961     OHOS::Security::Hks::HksIpcSerializationTest002();
962     OHOS::Security::Hks::HksIpcSerializationTest003();
963     OHOS::Security::Hks::HksIpcSerializationTest004();
964     OHOS::Security::Hks::HksIpcSerializationTest005();
965     OHOS::Security::Hks::HksIpcSerializationTest006();
966     OHOS::Security::Hks::HksIpcSerializationTest007();
967     OHOS::Security::Hks::HksIpcSerializationTest008();
968     OHOS::Security::Hks::HksIpcSerializationTest009();
969     OHOS::Security::Hks::HksIpcSerializationTest010();
970     OHOS::Security::Hks::HksIpcSerializationTest011();
971     OHOS::Security::Hks::HksIpcServiceTest001();
972     OHOS::Security::Hks::HksIpcServiceTest002();
973     OHOS::Security::Hks::HksIpcServiceTest003();
974     OHOS::Security::Hks::HksIpcServiceTest004();
975     OHOS::Security::Hks::HksIpcServiceTest005();
976     OHOS::Security::Hks::HksIpcServiceTest006();
977     OHOS::Security::Hks::HksIpcServiceTest007();
978     OHOS::Security::Hks::HksIpcServiceTest008();
979     OHOS::Security::Hks::HksIpcServiceTest009();
980     OHOS::Security::Hks::HksIpcServiceTest010();
981     OHOS::Security::Hks::HksIpcServiceTest011();
982     OHOS::Security::Hks::HksIpcServiceTest012();
983     OHOS::Security::Hks::HksIpcServiceTest013();
984     OHOS::Security::Hks::HksIpcServiceTest014();
985     OHOS::Security::Hks::HksIpcServiceTest015();
986     OHOS::Security::Hks::HksIpcServiceTest016();
987     OHOS::Security::Hks::HksIpcServiceTest017();
988     OHOS::Security::Hks::HksIpcServiceTest018();
989     OHOS::Security::Hks::HksIpcServiceTest019();
990     OHOS::Security::Hks::HksIpcServiceTest020();
991     OHOS::Security::Hks::HksIpcServiceTest021();
992     OHOS::Security::Hks::HksIpcServiceTest022();
993 
994     return 0;
995 }
996