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") 15import("../pin_auth.gni") 16 17declare_args() { 18 pin_auth_enabled = true 19} 20 21config("pin_auth_services_config") { 22 include_dirs = [ 23 "sa/inc", 24 "modules/common/inc", 25 "modules/driver/inc", 26 "modules/executors/inc", 27 "modules/inputters/inc", 28 ] 29} 30 31ohos_source_set("pinauthservice_source_set") { 32 sanitize = { 33 integer_overflow = true 34 ubsan = true 35 boundary_sanitize = true 36 cfi = true 37 cfi_cross_dso = true 38 debug = false 39 blocklist = "../cfi_blocklist.txt" 40 } 41 branch_protector_ret = "pac_ret" 42 sources = [ 43 "modules/driver/src/pin_auth_driver_hdi.cpp", 44 "modules/driver/src/pin_auth_interface_adapter.cpp", 45 "modules/executors/src/pin_auth_all_in_one_hdi.cpp", 46 "modules/executors/src/pin_auth_collector_hdi.cpp", 47 "modules/executors/src/pin_auth_executor_callback_hdi.cpp", 48 "modules/executors/src/pin_auth_executor_hdi_common.cpp", 49 "modules/executors/src/pin_auth_verifier_hdi.cpp", 50 "modules/inputters/src/i_inputer_data_impl.cpp", 51 "modules/inputters/src/pin_auth_manager.cpp", 52 "sa/src/pin_auth_service.cpp", 53 ] 54 55 configs = [ 56 ":pin_auth_services_config", 57 "../common:iam_log_config", 58 "../common:iam_utils_config", 59 ] 60 61 public_configs = [ ":pin_auth_services_config" ] 62 63 deps = [ "../frameworks:pinauth_ipc" ] 64 65 external_deps = [ 66 "access_token:libaccesstoken_sdk", 67 "c_utils:utils", 68 "drivers_interface_pin_auth:libpin_auth_proxy_2.1", 69 "hilog:libhilog", 70 "ipc:ipc_single", 71 "openssl:libcrypto_shared", 72 "safwk:system_ability_fwk", 73 "samgr:samgr_proxy", 74 "user_auth_framework:userauth_executors", 75 ] 76 77 defines = [] 78 if (sensors_miscdevice_enable) { 79 external_deps += [ "miscdevice:vibrator_interface_native" ] 80 defines += [ "SENSORS_MISCDEVICE_ENABLE" ] 81 } 82 83 remove_configs = [ "//build/config/compiler:no_exceptions" ] 84 85 subsystem_name = "useriam" 86 part_name = "pin_auth" 87} 88 89ohos_shared_library("pinauthservice") { 90 sanitize = { 91 integer_overflow = true 92 ubsan = true 93 boundary_sanitize = true 94 cfi = true 95 cfi_cross_dso = true 96 debug = false 97 blocklist = "../cfi_blocklist.txt" 98 } 99 branch_protector_ret = "pac_ret" 100 deps = [ ":pinauthservice_source_set" ] 101 102 external_deps = [ "hilog:libhilog" ] 103 104 public_configs = [ ":pin_auth_services_config" ] 105 106 if (use_musl) { 107 version_script = "pin_auth_service_map" 108 } 109 110 subsystem_name = "useriam" 111 part_name = "pin_auth" 112} 113