1 # Copyright (c) 2023 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 14 #####################hydra-fuzz################### 15 import("//build/config/features.gni") 16 import("//build/ohos.gni") 17 import("//build/test.gni") 18 module_output_path = "certificate_framework/certificate_framework" 19 20 ##############################fuzztest########################################## 21 ohos_fuzztest("X509CrlFuzzTest") { 22 module_out_path = module_output_path 23 fuzz_config_file = "../x509crl_fuzzer" 24 configs = [ "../../../../config/build:coverage_flag_cc" ] 25 include_dirs = [ 26 "../../../../frameworks/adapter/v1.0/inc", 27 "../../../../frameworks/common/v1.0/inc", 28 "../../../../frameworks/core/v1.0/spi", 29 "//third_party/openssl/include", 30 "../../../../test/unittest/v1.0/include", 31 ] 32 sources = [ "x509crl_fuzzer.cpp" ] 33 cflags = [ 34 "-g", 35 "-O0", 36 "-Wno-unused-variable", 37 "-fno-omit-frame-pointer", 38 "-DHILOG_ENABLE", 39 ] 40 if (target_cpu == "arm") { 41 cflags += [ "-DBINDER_IPC_32BIT" ] 42 } 43 44 deps = [] 45 46 external_deps = [ 47 "c_utils:utils", 48 "certificate_framework:certificate_framework_core", 49 "crypto_framework:crypto_framework_lib", 50 "hilog:libhilog", 51 "openssl:libcrypto_shared", 52 ] 53 } 54 55 ############################################################################### 56 group("fuzztest") { 57 testonly = true 58 deps = [] 59 deps += [ 60 # deps file 61 ":X509CrlFuzzTest", 62 ] 63 } 64 ############################################################################### 65