1# Copyright (c) 2024-2025 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("//build/config/components/idl_tool/idl.gni") 15import("//build/ohos.gni") 16import("../../../access_token.gni") 17 18idl_gen_interface("el5_filekey_manager_interface") { 19 sources = [ "El5FilekeyManagerInterface.idl" ] 20 sources_callback = [ "El5FilekeyCallbackInterface.idl" ] 21 sources_common = [ "data_lock_type.idl" ] 22 subsystem_name = "security" 23 part_name = "access_token" 24} 25 26config("efm_innerkits") { 27 visibility = [ ":*" ] 28 include_dirs = [ 29 "include", 30 "${access_token_path}/frameworks/inner_api/el5filekeymanager/include/", 31 "${target_gen_dir}", 32 ] 33} 34 35ohos_source_set("el5_filekey_manager_proxy") { 36 sanitize = { 37 cfi = true 38 cfi_cross_dso = true 39 debug = false 40 } 41 output_values = get_target_outputs(":el5_filekey_manager_interface") 42 sources = [] 43 sources += filter_include(output_values, [ "*callback_interface_stub.cpp" ]) 44 sources += filter_include(output_values, [ "*manager_interface_proxy.cpp" ]) 45 public_configs = [ ":efm_innerkits" ] 46 deps = [ ":el5_filekey_manager_interface" ] 47 external_deps = [ 48 "c_utils:utils", 49 "ipc:ipc_core", 50 ] 51 subsystem_name = "security" 52 part_name = "access_token" 53} 54 55ohos_source_set("el5_filekey_manager_stub") { 56 sanitize = { 57 cfi = true 58 cfi_cross_dso = true 59 debug = false 60 } 61 output_values = get_target_outputs(":el5_filekey_manager_interface") 62 sources = [] 63 sources += filter_include(output_values, [ "*callback_interface_proxy.cpp" ]) 64 sources += filter_include(output_values, [ "*manager_interface_stub.cpp" ]) 65 public_configs = [ ":efm_innerkits" ] 66 deps = [ ":el5_filekey_manager_interface" ] 67 external_deps = [ 68 "c_utils:utils", 69 "ipc:ipc_core", 70 ] 71 subsystem_name = "security" 72 part_name = "access_token" 73} 74 75ohos_shared_library("el5_filekey_manager_sdk") { 76 sanitize = { 77 cfi = true 78 cfi_cross_dso = true 79 debug = false 80 } 81 branch_protector_ret = "pac_ret" 82 83 cflags_cc = [ 84 "-fdata-sections", 85 "-ffunction-sections", 86 "-fno-asynchronous-unwind-tables", 87 "-fno-unwind-tables", 88 "-Os", 89 ] 90 91 public_configs = [ ":efm_innerkits" ] 92 93 include_dirs = [ 94 "${access_token_path}/frameworks/common/include", 95 "${access_token_path}/frameworks/inner_api/el5filekeymanager/include/", 96 ] 97 98 sources = [ 99 "src/app_key_info.cpp", 100 "src/app_key_load_info.cpp", 101 "src/el5_filekey_manager_client.cpp", 102 "src/el5_filekey_manager_kit.cpp", 103 "src/user_app_key_info.cpp", 104 ] 105 106 deps = [ ":el5_filekey_manager_proxy" ] 107 108 external_deps = [ 109 "c_utils:utils", 110 "hilog:libhilog", 111 "ipc:ipc_core", 112 "ipc:ipc_single", 113 "samgr:samgr_proxy", 114 ] 115 116 subsystem_name = "security" 117 part_name = "access_token" 118} 119