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