1# Copyright (c) 2022-2024 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") 15 16if (!defined(global_parts_info) || 17 defined(global_parts_info.account_os_account)) { 18 has_os_account_part = true 19} else { 20 has_os_account_part = false 21} 22 23if (!defined(global_parts_info) || 24 defined(global_parts_info.notification_common_event_service)) { 25 has_notification_common_event_service = true 26} else { 27 has_notification_common_event_service = false 28} 29 30config("userauth_service_core_config") { 31 include_dirs = [ 32 "inc", 33 "src", 34 "../context/inc", 35 "../ipc/inc", 36 ] 37} 38 39ohos_source_set("userauth_service_core") { 40 sanitize = { 41 integer_overflow = true 42 ubsan = true 43 boundary_sanitize = true 44 cfi = true 45 cfi_cross_dso = true 46 debug = false 47 blocklist = "../../cfi_blocklist.txt" 48 } 49 branch_protector_ret = "pac_ret" 50 include_dirs = [ 51 "inc", 52 "src", 53 ] 54 55 remove_configs = [ "//build/config/compiler:no_exceptions" ] 56 57 sources = [ 58 "src/auth_event_listener_manager.cpp", 59 "src/authentication_impl.cpp", 60 "src/credential_info_impl.cpp", 61 "src/enrolled_info_impl.cpp", 62 "src/enrollment_impl.cpp", 63 "src/identification_impl.cpp", 64 "src/ipc_common.cpp", 65 "src/remote_executor_proxy.cpp", 66 "src/remote_msg_util.cpp", 67 "src/resource_node_impl.cpp", 68 "src/resource_node_pool_impl.cpp", 69 "src/resource_node_utils.cpp", 70 "src/schedule_node_builder.cpp", 71 "src/schedule_node_helper.cpp", 72 "src/schedule_node_impl.cpp", 73 "src/schedule_resource_node_listener.cpp", 74 "src/secure_user_info_impl.cpp", 75 "src/system_param_manager.cpp", 76 "src/update_pin_param_impl.cpp", 77 "src/user_idm_database_impl.cpp", 78 "src/user_idm_session_controller_impl.cpp", 79 "src/user_info_impl.cpp", 80 "src/widget_schedule_node_impl.cpp", 81 ] 82 83 deps = [ 84 "../../frameworks/native/client:userauth_client", 85 "../../frameworks/native/common:attributes", 86 "../../frameworks/native/common:dfx", 87 "../../services/base:userauth_service_base", 88 ] 89 90 external_deps = [ 91 "ability_runtime:app_manager", 92 "access_token:libaccesstoken_sdk", 93 "access_token:libtokenid_sdk", 94 "c_utils:utils", 95 "device_manager:devicemanagersdk", 96 "drivers_interface_user_auth:libuser_auth_proxy_3.0", 97 "hdf_core:libhdi", 98 "hilog:libhilog", 99 "hitrace:hitrace_meter", 100 "init:libbegetutil", 101 "ipc:ipc_core", 102 "safwk:system_ability_fwk", 103 "samgr:samgr_proxy", 104 ] 105 106 if (has_os_account_part) { 107 cflags_cc = [ "-DHAS_OS_ACCOUNT_PART" ] 108 external_deps += [ "os_account:os_account_innerkits" ] 109 } 110 111 if (has_notification_common_event_service) { 112 sources += [ "src/publish_event_adapter.cpp" ] 113 external_deps += [ "common_event_service:cesfwk_innerkits" ] 114 } else { 115 sources += [ "src/publish_event_adapter_mock.cpp" ] 116 } 117 118 public_configs = [ ":userauth_service_core_config" ] 119 120 configs = [ 121 "../../common:iam_log_config", 122 "../../common:iam_utils_config", 123 "../../frameworks/native/ipc:userauth_client_ipc_config", 124 "../remote_connect:userauth_service_remote_connect_config", 125 ] 126 127 subsystem_name = "useriam" 128 part_name = "user_auth_framework" 129} 130