• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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
16ohos_shared_library("huks") {
17  defines = [
18    "L2_STANDARD",
19    "_HARDWARE_ROOT_KEY_",
20    "_HUKS_LOG_ENABLE_",
21  ]
22
23  include_dirs = [
24    "//base/security/huks/interfaces/innerkits/huks_standard/main/include",
25    "//base/security/huks/frameworks/huks_standard/main/common/include",
26    "//foundation/ace/napi/interfaces/kits/napi",
27    "//utils/native/base/include",
28    "//third_party/node/src",
29    "include",
30  ]
31
32  sources = [
33    "src/huks_napi.cpp",
34    "src/huks_napi_abort.cpp",
35    "src/huks_napi_agree_key.cpp",
36    "src/huks_napi_attest_key.cpp",
37    "src/huks_napi_common.cpp",
38    "src/huks_napi_decrypt.cpp",
39    "src/huks_napi_delete_key.cpp",
40    "src/huks_napi_derive_key.cpp",
41    "src/huks_napi_encrypt.cpp",
42    "src/huks_napi_export_key.cpp",
43    "src/huks_napi_finish.cpp",
44    "src/huks_napi_generate_key.cpp",
45    "src/huks_napi_get_certificate_chain.cpp",
46    "src/huks_napi_get_key_properties.cpp",
47    "src/huks_napi_get_sdk_version.cpp",
48    "src/huks_napi_import_key.cpp",
49    "src/huks_napi_init.cpp",
50    "src/huks_napi_is_key_exist.cpp",
51    "src/huks_napi_mac.cpp",
52    "src/huks_napi_sign.cpp",
53    "src/huks_napi_unwrap_key.cpp",
54    "src/huks_napi_update.cpp",
55    "src/huks_napi_verify.cpp",
56    "src/huks_napi_wrap_key.cpp",
57  ]
58
59  deps = [ "//foundation/ace/napi:ace_napi" ]
60
61  external_deps = [ "huks:libhukssdk" ]
62  cflags_cc = [
63    "-Wall",
64    "-Werror",
65  ]
66
67  relative_install_dir = "module/security"
68  subsystem_name = "security"
69  part_name = "huks"
70}
71