1# Copyright (c) 2022-2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("//build/test.gni") 16 17ohos_unittest("UserAuthCoAuthTest") { 18 sanitize = { 19 integer_overflow = true 20 ubsan = true 21 boundary_sanitize = true 22 cfi = true 23 cfi_cross_dso = true 24 debug = false 25 } 26 branch_protector_ret = "pac_ret" 27 module_out_path = "useriam/user_auth_hdi" 28 29 cflags = [ "-DIAM_TEST_ENABLE" ] 30 31 include_dirs = [ 32 "../../../hdi_service/adaptor/inc", 33 "../../../hdi_service/coauth/inc", 34 "../../../hdi_service/common/inc", 35 "../../../hdi_service/database/inc", 36 "../../../hdi_service/idm/inc", 37 "../../../hdi_service/interface", 38 "../../../hdi_service/key_mgr/inc", 39 "../../../hdi_service/user_auth/inc", 40 "../../../hdi_service/utils/inc", 41 "../../../common/logs", 42 "../../../common/utils", 43 ] 44 45 sources = [ 46 "../../../hdi_service/adaptor/src/adaptor_algorithm.c", 47 "../../../hdi_service/adaptor/src/adaptor_file.c", 48 "../../../hdi_service/adaptor/src/adaptor_memory.c", 49 "../../../hdi_service/adaptor/src/adaptor_time.c", 50 "../../../hdi_service/adaptor/src/buffer.c", 51 "../../../hdi_service/adaptor/src/file_operator.c", 52 "../../../hdi_service/coauth/src/coauth.c", 53 "../../../hdi_service/coauth/src/coauth_funcs.c", 54 "../../../hdi_service/coauth/src/executor_message.c", 55 "../../../hdi_service/coauth/src/pool.c", 56 "../../../hdi_service/common/src/user_sign_centre.c", 57 "../../../hdi_service/database/src/idm_common.c", 58 "../../../hdi_service/database/src/idm_database.c", 59 "../../../hdi_service/database/src/idm_file_manager.c", 60 "../../../hdi_service/hal_sdk/useriam_common.cpp", 61 "../../../hdi_service/idm/src/enroll_specification_check.c", 62 "../../../hdi_service/idm/src/idm_session.c", 63 "../../../hdi_service/idm/src/user_idm_funcs.c", 64 "../../../hdi_service/key_mgr/src/ed25519_key.c", 65 "../../../hdi_service/key_mgr/src/hmac_key.c", 66 "../../../hdi_service/key_mgr/src/token_key.c", 67 "../../../hdi_service/key_mgr/src/udid_manager.c", 68 "../../../hdi_service/service/user_auth_interface_service.cpp", 69 "../../../hdi_service/user_auth/src/auth_level.c", 70 "../../../hdi_service/user_auth/src/auth_token_signer.c", 71 "../../../hdi_service/user_auth/src/context_manager.c", 72 "../../../hdi_service/user_auth/src/identify_funcs.c", 73 "../../../hdi_service/user_auth/src/user_auth_funcs.c", 74 "../../../hdi_service/utils/src/attribute.c", 75 "../../../hdi_service/utils/src/c_array.c", 76 "../../../hdi_service/utils/src/linked_list.c", 77 "co_auth_funcs_test.cpp", 78 "co_auth_test.cpp", 79 "executor_message_test.cpp", 80 "pool_test.cpp", 81 ] 82 83 remove_configs = [ "//build/config/compiler:no_exceptions" ] 84 85 external_deps = [ 86 "c_utils:utils", 87 "drivers_interface_user_auth:user_auth_idl_headers", 88 "hdf_core:libhdf_utils", 89 "hilog:libhilog", 90 "ipc:ipc_core", 91 "ipc:ipc_single", 92 "openssl:libcrypto_shared", 93 ] 94 95 subsystem_name = "hdf" 96 part_name = "drivers_peripheral_user_auth" 97} 98