1# Copyright (c) 2023-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
17ohos_source_set("pinauth_ipc_fuzzer") {
18  branch_protector_ret = "pac_ret"
19  include_dirs = [
20    "../../../frameworks/ipc/inc",
21    "../../../frameworks/ipc/common_defines",
22  ]
23
24  sources = [
25    "../../../frameworks/ipc/src/inputer_get_data_proxy.cpp",
26    "../../../frameworks/ipc/src/inputer_get_data_stub.cpp",
27    "../../../frameworks/ipc/src/inputer_set_data_proxy.cpp",
28    "../../../frameworks/ipc/src/inputer_set_data_stub.cpp",
29    "../../../frameworks/ipc/src/pin_auth_proxy.cpp",
30    "../../../frameworks/ipc/src/pin_auth_stub.cpp",
31  ]
32
33  configs = [ "../../../common:iam_log_config" ]
34  public_configs = [ "../../../frameworks:pinauth_ipc_config" ]
35
36  external_deps = [
37    "c_utils:utils",
38    "hilog:libhilog",
39    "ipc:ipc_single",
40    "user_auth_framework:userauth_client",
41  ]
42
43  subsystem_name = "useriam"
44  part_name = "pin_auth"
45}
46
47ohos_source_set("pinauthservice_source_set_fuzzer") {
48  branch_protector_ret = "pac_ret"
49  sources = [
50    "../../../services/modules/driver/src/pin_auth_driver_hdi.cpp",
51    "../../../services/modules/driver/src/pin_auth_interface_adapter.cpp",
52    "../../../services/modules/executors/src/pin_auth_all_in_one_hdi.cpp",
53    "../../../services/modules/executors/src/pin_auth_collector_hdi.cpp",
54    "../../../services/modules/executors/src/pin_auth_executor_callback_hdi.cpp",
55    "../../../services/modules/executors/src/pin_auth_executor_hdi_common.cpp",
56    "../../../services/modules/executors/src/pin_auth_verifier_hdi.cpp",
57    "../../../services/modules/inputters/src/i_inputer_data_impl.cpp",
58    "../../../services/modules/inputters/src/pin_auth_manager.cpp",
59    "../../../services/sa/src/pin_auth_service.cpp",
60  ]
61
62  configs = [
63    "../../../services:pin_auth_services_config",
64    "../../../common:iam_log_config",
65    "../../../common:iam_utils_config",
66  ]
67
68  public_configs = [ "../../../services:pin_auth_services_config" ]
69
70  deps = [ "../common_fuzzer:pinauth_ipc_fuzzer" ]
71
72  external_deps = [
73    "access_token:libaccesstoken_sdk",
74    "c_utils:utils",
75    "drivers_interface_pin_auth:libpin_auth_proxy_2.1",
76    "hilog:libhilog",
77    "ipc:ipc_single",
78    "openssl:libcrypto_shared",
79    "safwk:system_ability_fwk",
80    "samgr:samgr_proxy",
81    "user_auth_framework:userauth_executors",
82  ]
83
84  defines = []
85  if (sensors_miscdevice_enable) {
86    external_deps += [ "miscdevice:vibrator_interface_native" ]
87    defines += [ "SENSORS_MISCDEVICE_ENABLE" ]
88  }
89  if (customization_enterprise_device_management_enable) {
90    external_deps += [ "enterprise_device_management:edmservice_kits" ]
91    defines += [ "CUSTOMIZATION_ENTERPRISE_DEVICE_MANAGEMENT_ENABLE" ]
92  }
93
94  remove_configs = [ "//build/config/compiler:no_exceptions" ]
95
96  subsystem_name = "useriam"
97  part_name = "pin_auth"
98}
99