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