• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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("//build/ohos/sa_profile/sa_profile.gni")
16import("../../code_signature.gni")
17
18ohos_shared_library("liblocal_code_sign") {
19  sources = [
20    "${code_signature_root_dir}/utils/src/cert_utils.cpp",
21    "src/local_code_sign_service.cpp",
22    "src/local_code_sign_stub.cpp",
23    "src/local_sign_key.cpp",
24    "src/permission_utils.cpp",
25  ]
26  include_dirs = [
27    "include",
28    "${code_signature_root_dir}/interfaces/innerkits/local_code_sign/include",
29    "${code_signature_root_dir}/utils/include",
30  ]
31  shlib_type = "sa"
32  public_configs = [ "${code_signature_root_dir}:common_public_config" ]
33  configs = [ "${code_signature_root_dir}:common_utils_config" ]
34  deps = [
35    "${code_signature_root_dir}/utils:fsverity_sign_src_set",
36    "${openssl_dir}:libcrypto_shared",
37    "${fsverity_utils_dir}:libfsverity_utils",
38  ]
39  external_deps = [
40    "access_token:libaccesstoken_sdk",
41    "access_token:libtokenid_sdk",
42    "c_utils:utils",
43    "eventhandler:libeventhandler",
44    "hisysevent:libhisysevent",
45    "hitrace:hitrace_meter",
46    "hilog:libhilog",
47    "huks:libhukssdk",
48    "ipc:ipc_core",
49    "safwk:system_ability_fwk",
50    "samgr:samgr_proxy",
51  ]
52
53  part_name = "code_signature"
54  subsystem_name = "security"
55
56  install_images = [ "system" ]
57  install_enable = true
58}
59
60group("local_code_sign_configs") {
61  deps = [
62    ":local_code_sign.cfg",
63    ":local_code_sign_sa_profile",
64  ]
65}
66
67ohos_prebuilt_etc("local_code_sign.cfg") {
68  source = "local_code_sign.cfg"
69  relative_install_dir = "init"
70  subsystem_name = "security"
71  part_name = "code_signature"
72}
73
74ohos_sa_profile("local_code_sign_sa_profile") {
75  sources = [ "sa_profile/3507.json" ]
76  part_name = "code_signature"
77}
78