1# Copyright (c) 2022-2024 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/features.gni") 15import("//build/test.gni") 16 17ohos_fuzztest("UserAuthHdiFuzzTest") { 18 branch_protector_ret = "pac_ret" 19 module_out_path = "drivers_peripheral_user_auth/drivers_peripheral_user_auth" 20 fuzz_config_file = "../userauthhdi_fuzzer" 21 cflags = [ 22 "-g", 23 "-O0", 24 "-Wno-unused-variable", 25 "-fno-omit-frame-pointer", 26 ] 27 include_dirs = [ 28 "../../../../hdi_service/adaptor/inc", 29 "../../../../hdi_service/coauth/inc", 30 "../../../../hdi_service/common/inc", 31 "../../../../hdi_service/database/inc", 32 "../../../../hdi_service/interface", 33 "../../../../hdi_service/idm/inc", 34 "../../../../hdi_service/key_mgr/inc", 35 "../../../../hdi_service/user_auth/inc", 36 "../../../../hdi_service/utils/inc", 37 "../../../../hdi_service/service", 38 "../../../../common/logs", 39 "../../../../common/utils", 40 ] 41 42 sources = [ 43 "../../../../hdi_service/adaptor/src/adaptor_algorithm.c", 44 "../../../../hdi_service/adaptor/src/adaptor_file.c", 45 "../../../../hdi_service/adaptor/src/adaptor_memory.c", 46 "../../../../hdi_service/adaptor/src/adaptor_time.c", 47 "../../../../hdi_service/adaptor/src/buffer.c", 48 "../../../../hdi_service/adaptor/src/file_operator.c", 49 "../../../../hdi_service/coauth/src/coauth.c", 50 "../../../../hdi_service/coauth/src/coauth_funcs.c", 51 "../../../../hdi_service/coauth/src/executor_message.c", 52 "../../../../hdi_service/coauth/src/pool.c", 53 "../../../../hdi_service/common/src/user_sign_centre.c", 54 "../../../../hdi_service/database/src/idm_common.c", 55 "../../../../hdi_service/database/src/idm_database.c", 56 "../../../../hdi_service/database/src/idm_file_manager.c", 57 "../../../../hdi_service/hal_sdk/useriam_common.cpp", 58 "../../../../hdi_service/idm/src/enroll_specification_check.c", 59 "../../../../hdi_service/idm/src/idm_session.c", 60 "../../../../hdi_service/idm/src/user_idm_funcs.c", 61 "../../../../hdi_service/key_mgr/src/ed25519_key.c", 62 "../../../../hdi_service/key_mgr/src/hmac_key.c", 63 "../../../../hdi_service/key_mgr/src/token_key.c", 64 "../../../../hdi_service/key_mgr/src/udid_manager.c", 65 "../../../../hdi_service/service/user_auth_interface_service.cpp", 66 "../../../../hdi_service/user_auth/src/auth_level.c", 67 "../../../../hdi_service/user_auth/src/auth_token_signer.c", 68 "../../../../hdi_service/user_auth/src/context_manager.c", 69 "../../../../hdi_service/user_auth/src/identify_funcs.c", 70 "../../../../hdi_service/user_auth/src/user_auth_funcs.c", 71 "../../../../hdi_service/utils/src/attribute.c", 72 "../../../../hdi_service/utils/src/c_array.c", 73 "../../../../hdi_service/utils/src/linked_list.c", 74 "iam_fuzz_test.cpp", 75 "user_auth_hdi_fuzzer.cpp", 76 ] 77 78 external_deps = [ 79 "c_utils:utils", 80 "drivers_interface_user_auth:user_auth_idl_headers", 81 "hilog:libhilog", 82 "ipc:ipc_core", 83 "openssl:libcrypto_shared", 84 ] 85 86 remove_configs = [ "//build/config/compiler:no_exceptions" ] 87 subsystem_name = "hdf" 88 part_name = "drivers_peripheral_user_auth" 89} 90