1094332d3Sopenharmony_ci# Copyright (c) 2022-2023 Huawei Device Co., Ltd.
2094332d3Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3094332d3Sopenharmony_ci# you may not use this file except in compliance with the License.
4094332d3Sopenharmony_ci# You may obtain a copy of the License at
5094332d3Sopenharmony_ci#
6094332d3Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7094332d3Sopenharmony_ci#
8094332d3Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9094332d3Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10094332d3Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11094332d3Sopenharmony_ci# See the License for the specific language governing permissions and
12094332d3Sopenharmony_ci# limitations under the License.
13094332d3Sopenharmony_ci
14094332d3Sopenharmony_ciimport("//build/ohos.gni")
15094332d3Sopenharmony_ciimport("//build/test.gni")
16094332d3Sopenharmony_ci
17094332d3Sopenharmony_ciohos_unittest("UserAuthIdmTest") {
18094332d3Sopenharmony_ci  sanitize = {
19094332d3Sopenharmony_ci    integer_overflow = true
20094332d3Sopenharmony_ci    ubsan = true
21094332d3Sopenharmony_ci    boundary_sanitize = true
22094332d3Sopenharmony_ci    cfi = true
23094332d3Sopenharmony_ci    cfi_cross_dso = true
24094332d3Sopenharmony_ci    debug = false
25094332d3Sopenharmony_ci    blocklist = "../../../cfi_blocklist.txt"
26094332d3Sopenharmony_ci  }
27094332d3Sopenharmony_ci  branch_protector_ret = "pac_ret"
28094332d3Sopenharmony_ci  module_out_path = "useriam/user_auth_hdi"
29094332d3Sopenharmony_ci
30094332d3Sopenharmony_ci  cflags = [ "-DIAM_TEST_ENABLE" ]
31094332d3Sopenharmony_ci
32094332d3Sopenharmony_ci  include_dirs = [
33094332d3Sopenharmony_ci    "../../../hdi_service/adaptor/inc",
34094332d3Sopenharmony_ci    "../../../hdi_service/coauth/inc",
35094332d3Sopenharmony_ci    "../../../hdi_service/common/inc",
36094332d3Sopenharmony_ci    "../../../hdi_service/database/inc",
37094332d3Sopenharmony_ci    "../../../hdi_service/idm/inc",
38094332d3Sopenharmony_ci    "../../../hdi_service/interface",
39094332d3Sopenharmony_ci    "../../../hdi_service/key_mgr/inc",
40094332d3Sopenharmony_ci    "../../../hdi_service/user_auth/inc",
41094332d3Sopenharmony_ci    "../../../hdi_service/utils/inc",
42094332d3Sopenharmony_ci    "../../../common/logs",
43094332d3Sopenharmony_ci    "../../../common/utils",
44094332d3Sopenharmony_ci  ]
45094332d3Sopenharmony_ci
46094332d3Sopenharmony_ci  sources = [
47094332d3Sopenharmony_ci    "../../../hdi_service/adaptor/src/adaptor_algorithm.c",
48094332d3Sopenharmony_ci    "../../../hdi_service/adaptor/src/adaptor_file.c",
49094332d3Sopenharmony_ci    "../../../hdi_service/adaptor/src/adaptor_memory.c",
50094332d3Sopenharmony_ci    "../../../hdi_service/adaptor/src/adaptor_time.c",
51094332d3Sopenharmony_ci    "../../../hdi_service/adaptor/src/buffer.c",
52094332d3Sopenharmony_ci    "../../../hdi_service/adaptor/src/file_operator.c",
53094332d3Sopenharmony_ci    "../../../hdi_service/coauth/src/coauth.c",
54094332d3Sopenharmony_ci    "../../../hdi_service/coauth/src/coauth_funcs.c",
55094332d3Sopenharmony_ci    "../../../hdi_service/coauth/src/executor_message.c",
56094332d3Sopenharmony_ci    "../../../hdi_service/coauth/src/pool.c",
57094332d3Sopenharmony_ci    "../../../hdi_service/common/src/user_sign_centre.c",
58094332d3Sopenharmony_ci    "../../../hdi_service/database/src/file_manager_utils.c",
59094332d3Sopenharmony_ci    "../../../hdi_service/database/src/global_config_file_manager.c",
60094332d3Sopenharmony_ci    "../../../hdi_service/database/src/idm_common.c",
61094332d3Sopenharmony_ci    "../../../hdi_service/database/src/idm_database.c",
62094332d3Sopenharmony_ci    "../../../hdi_service/database/src/idm_file_manager.c",
63094332d3Sopenharmony_ci    "../../../hdi_service/hal_sdk/useriam_common.cpp",
64094332d3Sopenharmony_ci    "../../../hdi_service/idm/src/enroll_specification_check.c",
65094332d3Sopenharmony_ci    "../../../hdi_service/idm/src/idm_session.c",
66094332d3Sopenharmony_ci    "../../../hdi_service/idm/src/user_idm_funcs.c",
67094332d3Sopenharmony_ci    "../../../hdi_service/key_mgr/src/ed25519_key.c",
68094332d3Sopenharmony_ci    "../../../hdi_service/key_mgr/src/hmac_key.c",
69094332d3Sopenharmony_ci    "../../../hdi_service/key_mgr/src/token_key.c",
70094332d3Sopenharmony_ci    "../../../hdi_service/key_mgr/src/udid_manager.c",
71094332d3Sopenharmony_ci    "../../../hdi_service/service/user_auth_interface_service.cpp",
72094332d3Sopenharmony_ci    "../../../hdi_service/user_auth/src/auth_level.c",
73094332d3Sopenharmony_ci    "../../../hdi_service/user_auth/src/auth_token_signer.c",
74094332d3Sopenharmony_ci    "../../../hdi_service/user_auth/src/context_manager.c",
75094332d3Sopenharmony_ci    "../../../hdi_service/user_auth/src/identify_funcs.c",
76094332d3Sopenharmony_ci    "../../../hdi_service/user_auth/src/user_auth_funcs.c",
77094332d3Sopenharmony_ci    "../../../hdi_service/utils/src/attribute.c",
78094332d3Sopenharmony_ci    "../../../hdi_service/utils/src/c_array.c",
79094332d3Sopenharmony_ci    "../../../hdi_service/utils/src/linked_list.c",
80094332d3Sopenharmony_ci    "enroll_specification_check_test.cpp",
81094332d3Sopenharmony_ci    "idm_session_test.cpp",
82094332d3Sopenharmony_ci    "user_idm_funcs_test.cpp",
83094332d3Sopenharmony_ci  ]
84094332d3Sopenharmony_ci
85094332d3Sopenharmony_ci  remove_configs = [ "//build/config/compiler:no_exceptions" ]
86094332d3Sopenharmony_ci
87094332d3Sopenharmony_ci  external_deps = [
88094332d3Sopenharmony_ci    "c_utils:utils",
89094332d3Sopenharmony_ci    "drivers_interface_user_auth:user_auth_idl_headers",
90094332d3Sopenharmony_ci    "hdf_core:libhdf_utils",
91094332d3Sopenharmony_ci    "hilog:libhilog",
92094332d3Sopenharmony_ci    "ipc:ipc_core",
93094332d3Sopenharmony_ci    "ipc:ipc_single",
94094332d3Sopenharmony_ci    "openssl:libcrypto_shared",
95094332d3Sopenharmony_ci  ]
96094332d3Sopenharmony_ci
97094332d3Sopenharmony_ci  subsystem_name = "hdf"
98094332d3Sopenharmony_ci  part_name = "drivers_peripheral_user_auth"
99094332d3Sopenharmony_ci}
100