# 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. 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") config("module_private_config") { visibility = [ ":*" ] include_dirs = [ "$base_root/commonlibrary/c_utils/base/include", "$base_root/third_party/bounds_checking_function/include", "include", ] } 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" 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", "src/huks_wrapped_test_common.cpp", ] if (huks_security_level != "trusted_environment") { sources += [ "src/huks_agree_dh_test.cpp", "src/huks_attest_test.cpp", "src/huks_attest_test_common.cpp", "src/huks_signverify_dsa_test.cpp", ] } include_dirs = [ "$base_root/test/xts/acts/security/security_huks_basic/huks_napi_BasicTest/include", "include", "$base_root/base/security/huks/interfaces/kits/c/include", "commonlibrary/c_utils/base/include", ] external_deps = [ "c_utils:utils", "huks:libhukssdk", ] deps = [ "$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", ] }