1# Copyright (C) 2022-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
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/crypto_framework"
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 += framework_inc_path + plugin_inc_path
29  sources = [ "symkeygenerator_fuzzer.cpp" ]
30  cflags = [
31    "-g",
32    "-O0",
33    "-Wno-unused-variable",
34    "-fno-omit-frame-pointer",
35    "-DHILOG_ENABLE",
36  ]
37  if (target_cpu == "arm") {
38    cflags += [ "-DBINDER_IPC_32BIT" ]
39  }
40
41  external_deps = [
42    "bounds_checking_function:libsec_shared",
43    "c_utils:utils",
44    "crypto_framework:crypto_framework_lib",
45    "hilog:libhilog",
46    "openssl:libcrypto_shared",
47  ]
48}
49
50###############################################################################
51group("fuzztest") {
52  testonly = true
53  deps = []
54  deps += [
55    # deps file
56    ":SymKeyGeneratorFuzzTest",
57  ]
58}
59###############################################################################
60