• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2024 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("ohcrypto") {
19  branch_protector_ret = "pac_ret"
20  if (os_level == "standard") {
21    sanitize = {
22      cfi = true
23      cfi_cross_dso = true
24      debug = false
25    }
26  }
27
28  cflags = [
29    "-DHILOG_ENABLE",
30    "-fPIC",
31    "-Wall",
32  ]
33
34  include_dirs = [
35    "../../interfaces/kits/native/include",
36    "include",
37  ]
38  include_dirs += framework_inc_path
39
40  sources = [
41    "src/asym_key.c",
42    "src/crypto_asym_cipher.c",
43    "src/crypto_common.c",
44    "src/crypto_kdf.c",
45    "src/crypto_key_agreement.c",
46    "src/crypto_mac.c",
47    "src/crypto_rand.c",
48    "src/digest.c",
49    "src/native_common.c",
50    "src/signature.c",
51    "src/sym_cipher.c",
52    "src/sym_key.c",
53  ]
54
55  deps = [ "${framework_path}:crypto_framework_lib" ]
56
57  external_deps = [
58    "bounds_checking_function:libsec_shared",
59    "hilog:libhilog",
60  ]
61
62  subsystem_name = "security"
63  output_extension = "so"
64  innerapi_tags = [ "ndk" ]
65  part_name = "crypto_framework"
66}
67