1# Copyright (C) 2021-2023 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/huks/build/config.gni") 15import("//build/ohos.gni") 16 17config("huks_config") { 18 include_dirs = [ "include" ] 19} 20 21if (os_level == "standard") { 22 ohos_shared_library("libhukssdk") { 23 branch_protector_ret = "pac_ret" 24 25 sanitize = { 26 integer_overflow = true 27 cfi = true 28 debug = false 29 cfi_cross_dso = true 30 boundary_sanitize = true 31 ubsan = true 32 } 33 subsystem_name = "security" 34 part_name = "huks" 35 innerapi_tags = [ 36 "platformsdk", 37 "sasdk", 38 "chipsetsdk", 39 ] 40 version_script = "libhukssdk.map" 41 public_configs = [ ":huks_config" ] 42 configs = [ 43 "//base/security/huks/frameworks/config/build:l2_standard_common_config", 44 ] 45 46 include_dirs = [ 47 "//base/security/huks/utils/crypto_adapter", 48 "../source", 49 ] 50 sources = [ 51 "../source/hks_api.c", 52 "../source/hks_api_adapter.c", 53 ] 54 55 deps = [ 56 "//base/security/huks/frameworks/huks_standard/main:huks_standard_frameworks", 57 "//base/security/huks/utils/crypto_adapter:libhuks_utils_client_service_adapter_static", 58 ] 59 external_deps = [ 60 "c_utils:utils", 61 "hilog:libhilog", 62 ] 63 install_images = [ 64 system_base_dir, 65 updater_base_dir, 66 ] 67 } 68} 69 70if (os_level == "small" || os_level == "mini") { 71 group("libhukssdk") { 72 } 73} 74