• 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    "${fsverity_utils_dir}:libfsverity_utils",
37    "${openssl_dir}:libcrypto_shared",
38  ]
39  external_deps = [
40    "access_token:libaccesstoken_sdk",
41    "access_token:libtokenid_sdk",
42    "c_utils:utils",
43    "eventhandler:libeventhandler",
44    "hilog:libhilog",
45    "hisysevent:libhisysevent",
46    "hitrace:hitrace_meter",
47    "huks:libhukssdk",
48    "init:libbegetutil",
49    "ipc:ipc_core",
50    "safwk:system_ability_fwk",
51    "samgr:samgr_proxy",
52  ]
53
54  part_name = "code_signature"
55  subsystem_name = "security"
56
57  install_images = [ "system" ]
58  install_enable = true
59}
60
61group("local_code_sign_configs") {
62  deps = [
63    ":local_code_sign.cfg",
64    ":local_code_sign_sa_profile",
65  ]
66}
67
68ohos_prebuilt_etc("local_code_sign.cfg") {
69  source = "local_code_sign.cfg"
70  relative_install_dir = "init"
71  subsystem_name = "security"
72  part_name = "code_signature"
73}
74
75ohos_sa_profile("local_code_sign_sa_profile") {
76  sources = [ "sa_profile/3507.json" ]
77  part_name = "code_signature"
78}
79