cfi configure in local_code_signature

Signed-off-by: zhenghui <zhenghui25@huawei.com>
This commit is contained in:
zhenghui 2024-01-23 16:06:36 +08:00
parent 31871f4562
commit b8ea760e4a
3 changed files with 19 additions and 1 deletions

View File

@ -19,6 +19,12 @@ config("public_local_code_sign_configs") {
}
ohos_shared_library("liblocal_code_sign_sdk") {
sanitize = {
cfi = true
cfi_cross_dso = true
debug = false
}
branch_protector_ret = "pac_ret"
sources = [
"src/local_code_sign_client.cpp",
"src/local_code_sign_kit.cpp",
@ -34,8 +40,8 @@ ohos_shared_library("liblocal_code_sign_sdk") {
external_deps = [
"c_utils:utils",
"hisysevent:libhisysevent",
"hilog:libhilog",
"hisysevent:libhisysevent",
"ipc:ipc_core",
"safwk:system_ability_fwk",
"samgr:samgr_proxy",

View File

@ -16,6 +16,12 @@ import("//build/ohos/sa_profile/sa_profile.gni")
import("../../code_signature.gni")
ohos_shared_library("liblocal_code_sign") {
sanitize = {
cfi = true
cfi_cross_dso = true
debug = false
}
branch_protector_ret = "pac_ret"
sources = [
"${code_signature_root_dir}/utils/src/cert_utils.cpp",
"src/local_code_sign_service.cpp",

View File

@ -64,6 +64,12 @@ ohos_unittest("code_sign_utils_unittest") {
}
ohos_unittest("local_code_sign_unittest") {
sanitize = {
cfi = true
cfi_cross_dso = true
debug = false
}
branch_protector_ret = "pac_ret"
module_out_path = "security/code_signature"
resource_config_file = "resources/ohos_test.xml"
sources = [ "local_code_sign_test.cpp" ]