1# Copyright (c) 2022 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/crypto_framework/frameworks/frameworks.gni") 15import("//base/security/crypto_framework/plugin/plugin.gni") 16 17#####################hydra-fuzz################### 18import("//build/config/features.gni") 19import("//build/ohos.gni") 20import("//build/test.gni") 21module_output_path = "crypto_framework/key" 22 23##############################fuzztest########################################## 24ohos_fuzztest("SymKeyGeneratorFuzzTest") { 25 module_out_path = module_output_path 26 fuzz_config_file = "//base/security/crypto_framework/test/fuzztest/key/symkeygenerator_fuzzer" 27 include_dirs = [ "./include" ] 28 include_dirs += [ 29 "//commonlibrary/c_utils/base/include", 30 "//third_party/openssl/include/", 31 ] 32 include_dirs += framework_inc_path + plugin_inc_path 33 sources = [ "symkeygenerator_fuzzer.cpp" ] 34 cflags = [ 35 "-g", 36 "-O0", 37 "-Wno-unused-variable", 38 "-fno-omit-frame-pointer", 39 "-DHILOG_ENABLE", 40 ] 41 if (target_cpu == "arm") { 42 cflags += [ "-DBINDER_IPC_32BIT" ] 43 } 44 45 deps = [ 46 "//base/security/crypto_framework:crypto_framework_lib", 47 "//base/security/crypto_framework:crypto_openssl_plugin_lib", 48 "//third_party/bounds_checking_function:libsec_shared", 49 "//third_party/openssl:libcrypto_shared", 50 ] 51 52 external_deps = [ 53 "c_utils:utils", 54 "hiviewdfx_hilog_native:libhilog", 55 ] 56} 57 58############################################################################### 59group("fuzztest") { 60 testonly = true 61 deps = [] 62 deps += [ 63 # deps file 64 ":SymKeyGeneratorFuzzTest", 65 ] 66} 67############################################################################### 68