BUILD.gn 3.0 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.

伞木希美 已提交
14
import("//base/security/huks/build/config.gni")
Z
zhanghanlin9 已提交
15 16 17
import("//base/security/huks/huks.gni")
import("//test/xts/tools/build/suite.gni")

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

27 28 29 30 31 32 33 34 35 36
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 已提交
37

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_dh_test.cpp",
    "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 73 74 75
  if (huks_security_level != "trusted_environment") {
    sources += [
      "src/huks_attest_test.cpp",
      "src/huks_attest_test_common.cpp",
      "src/huks_signverify_dsa_test.cpp",
    ]
  }

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

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