• 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("//base/security/device_security_level/common/dslm.gni")
15import("//build/ohos.gni")
16
17# service_common object
18ohos_source_set("service_common_obj") {
19  sources = [
20    "dslm_crypto.c",
21    "dslm_msg_serialize.c",
22  ]
23
24  include_dirs = [
25    "../include",
26    "../../interfaces/inner_api/include",
27  ]
28
29  deps = [ "../..//baselib/utils:utils_static" ]
30
31  if (defined(ohos_lite)) {
32    if (ohos_kernel_type == "linux" || ohos_kernel_type == "liteos_a") {
33      deps += [ "$dslm_ipc_path/interfaces/innerkits/c/ipc:ipc_single" ]
34      external_deps = [ "hilog_lite:hilog_shared" ]
35    } else if (ohos_kernel_type == "liteos_m") {
36      deps += [ "$dslm_hilog_path/featured:hilog_static" ]
37    }
38  } else {
39    sanitize = {
40      integer_overflow = true
41      ubsan = true
42      boundary_sanitize = true
43      cfi = true
44      cfi_cross_dso = true
45      blocklist = "../../cfi_blocklist.txt"
46    }
47    branch_protector_ret = "pac_ret"
48
49    external_deps = [
50      "c_utils:utils",
51      "hilog:libhilog",
52      "ipc:ipc_core",
53      "openssl:libcrypto_shared",
54    ]
55  }
56
57  configs = [
58    "../../common:common_configs",
59    "../../common:common_lite_configs",
60  ]
61
62  part_name = "device_security_level"
63  subsystem_name = "security"
64}
65