# Copyright (c) 2023-2024 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. import("//build/ohos.gni") import("../../../code_signature.gni") config("public_local_code_sign_configs") { include_dirs = [ "include" ] } ohos_shared_library("liblocal_code_sign_sdk") { sanitize = { cfi = true cfi_cross_dso = true debug = false } branch_protector_ret = "pac_ret" sources = [ "${code_signature_root_dir}/utils/src/cert_utils.cpp", "${code_signature_root_dir}/utils/src/huks_attest_verifier.cpp", "${code_signature_root_dir}/utils/src/openssl_utils.cpp", "src/local_code_sign_client.cpp", "src/local_code_sign_kit.cpp", "src/local_code_sign_load_callback.cpp", "src/local_code_sign_proxy.cpp", ] public_configs = [ "${code_signature_root_dir}:common_public_config", ":public_local_code_sign_configs", ] configs = [ "${code_signature_root_dir}:common_utils_config" ] defines = [] if (build_variant == "root") { defines += [ "CODE_SIGNATURE_DEBUGGABLE" ] } if (code_signature_support_oh_code_sign) { defines += [ "VERIFY_KEY_ATTEST_CERTCHAIN" ] } external_deps = [ "c_utils:utils", "hilog:libhilog", "hisysevent:libhisysevent", "huks:libhukssdk", "ipc:ipc_core", "openssl:libcrypto_shared", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] part_name = "code_signature" subsystem_name = "security" install_images = [ "system" ] install_enable = true }