• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022 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
16declare_args() {
17  certificate_manager_feature_ca_enabled = "true"
18}
19
20declare_args() {
21  certificate_manager_feature_credential_enabled = "true"
22}
23
24ohos_prebuilt_etc("cert_manager_service.rc") {
25  source = "cert_manager_service.cfg"
26  relative_install_dir = "init"
27  subsystem_name = "security"
28  part_name = "certificate_manager"
29}
30
31ohos_shared_library("cert_manager_service") {
32  branch_protector_ret = "pac_ret"
33  sanitize = {
34    cfi = true
35    cfi_cross_dso = true
36    boundary_sanitize = true
37    debug = false
38    integer_overflow = true
39    ubsan = true
40  }
41  subsystem_name = "security"
42  part_name = "certificate_manager"
43  defines = [
44    "L2_STANDARD",
45    "_CM_LOG_ENABLE_",
46  ]
47
48  if (certificate_manager_feature_ca_enabled == "false") {
49    defines += [ "CERTIFICATE_MANAGER_FEATURE_CA_DISABLED" ]
50  }
51  if (certificate_manager_feature_credential_enabled == "false") {
52    defines += [ "CERTIFICATE_MANAGER_FEATURE_CREDENTIAL_DISABLED" ]
53  }
54
55  deps = [
56    ":cert_manager_service.rc",
57    "cert_manager_engine/main/core:cert_manager_engine_core_standard",
58    "cert_manager_engine/main/rdb:libcert_manager_rdb_static",
59    "cert_manager_service/main/os_dependency:libcert_manager_service_os_dependency_standard_static",
60  ]
61  external_deps = [
62    "hilog:libhilog",
63    "ipc:ipc_core",
64    "safwk:system_ability_fwk",
65    "samgr:samgr_proxy",
66  ]
67}
68