BUILD.gn 3.2 KB
Newer Older
Z
zhanghanlin9 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13
# Copyright (c) 2020-2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

Q
qiaozzzh 已提交
14 15 16 17
base_root = "../../../../../"
import("$base_root/base/security/huks/build/config.gni")
import("$base_root/base/security/huks/huks.gni")
import("$base_root/test/xts/tools/build/suite.gni")
Z
zhanghanlin9 已提交
18

19 20 21
config("module_private_config") {
  visibility = [ ":*" ]
  include_dirs = [
Q
qiaozzzh 已提交
22 23
    "$base_root/commonlibrary/c_utils/base/include",
    "$base_root/third_party/bounds_checking_function/include",
24 25
    "include",
  ]
Z
zhanghanlin9 已提交
26 27
}

28 29 30 31 32 33 34 35 36 37
ohos_moduletest_suite("ActsHuksNAPITest") {
  configs = [ ":module_private_config" ]
  cflags_cc = [ "-DHILOG_ENABLE" ]
  defines = [
    "_STANDARD_SYSTEM_",
    "CONFIG_HUKS_STAGED",
    "_USE_OPENSSL_",
  ]
  subsystem_name = "security"
  part_name = "huks"
Z
zhanghanlin9 已提交
38

39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
  sources = [
    "src/huks_agree_ecdh_test.cpp",
    "src/huks_agree_ecdh_test_common.cpp",
    "src/huks_agree_x25519_test.cpp",
    "src/huks_cipher_aes_test.cpp",
    "src/huks_cipher_aes_test_common.cpp",
    "src/huks_cipher_rsa_test.cpp",
    "src/huks_cipher_rsa_test_common.cpp",
    "src/huks_cipher_sm4_test.cpp",
    "src/huks_cipher_sm4_test_common.cpp",
    "src/huks_derive_hkdf_test.cpp",
    "src/huks_derive_hkdf_test_common.cpp",
    "src/huks_derive_pbkdf_test.cpp",
    "src/huks_derive_pbkdf_test_common.cpp",
    "src/huks_hmac_test.cpp",
    "src/huks_mem.cpp",
    "src/huks_misc_test.cpp",
    "src/huks_nullptr_test.cpp",
    "src/huks_signverify_ecc_test.cpp",
    "src/huks_signverify_ecc_test_common.cpp",
    "src/huks_signverify_ed25519_test.cpp",
    "src/huks_signverify_rsa_test.cpp",
    "src/huks_signverify_rsa_test_common.cpp",
    "src/huks_signverify_sm2_test.cpp",
    "src/huks_three_stage_test_common.cpp",
    "src/huks_warpped_test.cpp",
N
fix bug  
nozomi 已提交
65
    "src/huks_wrapped_test_common.cpp",
66
  ]
Z
zhanghanlin9 已提交
67

伞木希美 已提交
68 69 70 71 72
  if (huks_security_level != "trusted_environment") {
    sources += [
      "src/huks_attest_test.cpp",
      "src/huks_attest_test_common.cpp",
      "src/huks_signverify_dsa_test.cpp",
73
      "src/huks_agree_dh_test.cpp",
伞木希美 已提交
74 75 76
    ]
  }

77
  include_dirs = [
Q
qiaozzzh 已提交
78
    "$base_root/test/xts/acts/security/security_huks_basic/huks_napi_BasicTest/include",
79
    "include",
Q
qiaozzzh 已提交
80
    "$base_root/base/security/huks/interfaces/kits/c/include",
81 82
    "commonlibrary/c_utils/base/include",
  ]
Z
zhanghanlin9 已提交
83

J
jianjew 已提交
84 85 86 87
  external_deps = [
    "c_utils:utils",
    "huks:libhukssdk",
  ]
88
  deps = [
Q
qiaozzzh 已提交
89 90 91 92 93
    "$base_root/base/security/huks/frameworks/huks_standard/main:huks_standard_frameworks",
    "$base_root/base/security/huks/frameworks/huks_standard/main/common:libhuks_common_standard_static",
    "$base_root/base/security/huks/interfaces/kits/c:huks_ndk",
    "$base_root/third_party/bounds_checking_function:libsec_static",
    "$base_root/third_party/openssl:libcrypto_shared",
94 95
  ]
}