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("../pin_auth.gni") 16 17config("pinauth_config") { 18 include_dirs = [ 19 "client/inc", 20 "../interfaces/inner_api", 21 "scrypt/inc", 22 ] 23} 24 25config("pinauth_ipc_config") { 26 include_dirs = [ 27 "ipc/inc", 28 "ipc/common_defines", 29 ] 30} 31 32ohos_source_set("pinauth_framework_source_set") { 33 sanitize = { 34 integer_overflow = true 35 ubsan = true 36 boundary_sanitize = true 37 cfi = true 38 cfi_cross_dso = true 39 debug = false 40 blocklist = "../cfi_blocklist.txt" 41 } 42 branch_protector_ret = "pac_ret" 43 sources = [ 44 "client/src/inputer_data_impl.cpp", 45 "client/src/inputer_get_data_service.cpp", 46 "client/src/pinauth_register_impl.cpp", 47 "client/src/settings_data_manager.cpp", 48 "scrypt/src/scrypt.cpp", 49 ] 50 51 deps = [ ":pinauth_ipc" ] 52 53 external_deps = [ 54 "c_utils:utils", 55 "data_share:datashare_consumer", 56 "hilog:libhilog", 57 "ipc:ipc_single", 58 "openssl:libcrypto_shared", 59 "samgr:samgr_proxy", 60 "user_auth_framework:userauth_client", 61 ] 62 63 if (customization_enterprise_device_management_enable) { 64 external_deps += [ 65 "ability_base:want", 66 "enterprise_device_management:edmservice_kits", 67 ] 68 defines = [ "CUSTOMIZATION_ENTERPRISE_DEVICE_MANAGEMENT_ENABLE" ] 69 } 70 71 configs = [ 72 "../common:iam_log_config", 73 "../common:iam_utils_config", 74 ":pinauth_ipc_config", 75 ] 76 77 public_configs = [ ":pinauth_config" ] 78 79 remove_configs = [ "//build/config/compiler:no_exceptions" ] 80 81 subsystem_name = "useriam" 82 part_name = "pin_auth" 83} 84 85ohos_shared_library("pinauth_framework") { 86 sanitize = { 87 integer_overflow = true 88 ubsan = true 89 boundary_sanitize = true 90 cfi = true 91 cfi_cross_dso = true 92 blocklist = "../cfi_blocklist.txt" 93 debug = false 94 } 95 branch_protector_ret = "pac_ret" 96 deps = [ ":pinauth_framework_source_set" ] 97 98 external_deps = [ "hilog:libhilog" ] 99 100 if (use_musl) { 101 version_script = "pin_auth_framework_map" 102 } 103 104 public_configs = [ ":pinauth_config" ] 105 106 subsystem_name = "useriam" 107 innerapi_tags = [ "platformsdk_indirect" ] 108 part_name = "pin_auth" 109} 110 111ohos_source_set("pinauth_ipc") { 112 sanitize = { 113 integer_overflow = true 114 ubsan = true 115 boundary_sanitize = true 116 cfi = true 117 cfi_cross_dso = true 118 debug = false 119 blocklist = "../cfi_blocklist.txt" 120 } 121 branch_protector_ret = "pac_ret" 122 include_dirs = [ 123 "ipc/inc", 124 "ipc/common_defines", 125 ] 126 127 sources = [ 128 "ipc/src/inputer_get_data_proxy.cpp", 129 "ipc/src/inputer_get_data_stub.cpp", 130 "ipc/src/inputer_set_data_proxy.cpp", 131 "ipc/src/inputer_set_data_stub.cpp", 132 "ipc/src/pin_auth_proxy.cpp", 133 "ipc/src/pin_auth_stub.cpp", 134 ] 135 136 configs = [ "../common:iam_log_config" ] 137 public_configs = [ ":pinauth_ipc_config" ] 138 139 external_deps = [ 140 "c_utils:utils", 141 "hilog:libhilog", 142 "ipc:ipc_single", 143 "user_auth_framework:userauth_client", 144 ] 145 146 subsystem_name = "useriam" 147 part_name = "pin_auth" 148} 149