1# 2# Copyright (c) 2023-2023 Huawei Device Co., Ltd. 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14# 15 16import("//base/security/huks/build/config.gni") 17import("//build/ohos.gni") 18 19ROOT_PATH = "../../../../../.." 20 21HUKS_PATH = "../../.." 22 23ohos_static_library("ace_kit_huks") { 24 subsystem_name = "security" 25 part_name = "huks" 26 27 cflags = [] 28 defines = [] 29 if (huks_config_file != "") { 30 print(huks_config_file) 31 cflags += [ "-DHKS_CONFIG_FILE=\"${huks_config_file}\"" ] 32 cflags_cc = cflags 33 } 34 35 sources = [ 36 "$HUKS_PATH/frameworks/huks_standard/main/common/src/hks_errcode_adapter.c", 37 "src/hks_lite_api.cpp", 38 "src/hks_lite_api_abort_session.cpp", 39 "src/hks_lite_api_common.cpp", 40 "src/hks_lite_api_delete_key_item.cpp", 41 "src/hks_lite_api_export_key_item.cpp", 42 "src/hks_lite_api_generate_key_item.cpp", 43 "src/hks_lite_api_get_key_properties.cpp", 44 "src/hks_lite_api_has_key_item.cpp", 45 "src/hks_lite_api_import_key_item.cpp", 46 "src/hks_lite_api_import_wrapped_key_item.cpp", 47 "src/hks_lite_api_init_session.cpp", 48 "src/hks_lite_api_is_key_item_exist.cpp", 49 "src/hks_lite_api_update_finish_session.cpp", 50 ] 51 deps = [] 52 include_dirs = [] 53 54 configs = [ "$ROOT_PATH/foundation/arkui/ace_engine_lite/frameworks/targets:ace_lite_target_config" ] 55 56 if (huks_enable_log == true) { 57 defines += [ "_HUKS_LOG_ENABLE_" ] 58 deps += 59 [ "$ROOT_PATH/base/hiviewdfx/hilog_lite/frameworks/mini:hilog_lite" ] 60 } 61 62 include_dirs += [ 63 "include", 64 "//third_party/bounds_checking_function/include", 65 "$ROOT_PATH/foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/jsi", 66 "$ROOT_PATH/foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/base", 67 "$ROOT_PATH/foundation/arkui/ace_engine_lite/frameworks/src/core/context", 68 "$ROOT_PATH/foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/async", 69 "$HUKS_PATH/frameworks/huks_standard/main/common/include", 70 ] 71 deps += [ 72 "$HUKS_PATH/interfaces/inner_api/huks_lite:huks_3.0_sdk", 73 "$ROOT_PATH/foundation/arkui/ace_engine_lite/frameworks:ace_lite", 74 "//third_party/bounds_checking_function:libsec_shared", 75 ] 76} 77