• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022-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("//base/security/crypto_framework/common/common.gni")
15import("//base/security/crypto_framework/frameworks/frameworks.gni")
16import("//build/ohos.gni")
17
18ohos_shared_library("cryptoframework_napi") {
19  branch_protector_ret = "pac_ret"
20  subsystem_name = "security"
21  part_name = "crypto_framework"
22  relative_install_dir = "module/security"
23  include_dirs = [ "inc" ]
24  include_dirs += framework_inc_path
25
26  if (os_level == "standard") {
27    sanitize = {
28      cfi = true
29      cfi_cross_dso = true
30      debug = false
31    }
32  }
33
34  cflags = [
35    "-DHILOG_ENABLE",
36    "-fPIC",
37    "-g3",
38  ]
39
40  sources = [
41    "src/napi_asy_key_generator.cpp",
42    "src/napi_asy_key_spec_generator.cpp",
43    "src/napi_cipher.cpp",
44    "src/napi_dh_key_util.cpp",
45    "src/napi_ecc_key_util.cpp",
46    "src/napi_init.cpp",
47    "src/napi_kdf.cpp",
48    "src/napi_key.cpp",
49    "src/napi_key_agreement.cpp",
50    "src/napi_key_pair.cpp",
51    "src/napi_mac.cpp",
52    "src/napi_md.cpp",
53    "src/napi_pri_key.cpp",
54    "src/napi_pub_key.cpp",
55    "src/napi_rand.cpp",
56    "src/napi_sign.cpp",
57    "src/napi_sm2_crypto_util.cpp",
58    "src/napi_sm2_ec_signature.cpp",
59    "src/napi_sym_key.cpp",
60    "src/napi_sym_key_generator.cpp",
61    "src/napi_utils.cpp",
62    "src/napi_verify.cpp",
63  ]
64
65  deps = [ "../../../../frameworks:crypto_framework_lib" ]
66
67  external_deps = [
68    "bounds_checking_function:libsec_shared",
69    "hilog:libhilog",
70    "napi:ace_napi",
71  ]
72}
73