xref: /aosp_15_r20/hardware/interfaces/security/keymint/support/fuzzer/Android.bp (revision 4d7e907c777eeecc4c5bd7cf640a754fac206ff7)
1/*
2 * Copyright (C) 2024 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18package {
19    // See: http://go/android-license-faq
20    // A large-scale-change added 'default_applicable_licenses' to import
21    // all of the 'license_kinds' from "hardware_interfaces_license"
22    // to get the below license kinds:
23    //   SPDX-license-identifier-Apache-2.0
24    default_applicable_licenses: ["hardware_interfaces_license"],
25    default_team: "trendy_team_android_hardware_backed_security",
26}
27
28cc_defaults {
29    name: "keymint_fuzzer_defaults",
30    static_libs: [
31        "libhidlbase",
32        "libkeymint_support",
33    ],
34    shared_libs: [
35        "libbase",
36        "libcrypto",
37        "libutils",
38        "libhardware",
39        "libbinder_ndk",
40        "liblog",
41    ],
42    defaults: [
43        "keymint_use_latest_hal_aidl_ndk_shared",
44    ],
45    include_dirs: [
46        "hardware/interfaces/security/keymint/support/include",
47        "frameworks/native/libs/binder/ndk/include_platform",
48    ],
49    fuzz_config: {
50        cc: [
51            "[email protected]",
52        ],
53        componentid: 1084733,
54        hotlists: [
55            "4593311",
56            "4271696",
57        ],
58        description: "The fuzzer targets the APIs of libkeymint_support",
59        vector: "local_no_privileges_required",
60        service_privilege: "privileged",
61        users: "multi_user",
62        fuzzed_code_usage: "shipped",
63    },
64}
65
66cc_defaults {
67    name: "keymint_remote_fuzzer_defaults",
68    static_libs: [
69        "libkeymint_remote_prov_support",
70        "android.hardware.security.rkp-V3-ndk",
71    ],
72    shared_libs: [
73        "libcppbor",
74        "libcppcose_rkp",
75        "libjsoncpp",
76        "libkeymaster_portable",
77    ],
78}
79
80cc_fuzz {
81    name: "keymint_attestation_fuzzer",
82    srcs: [
83        "keymint_attestation_fuzzer.cpp",
84    ],
85    defaults: [
86        "keymint_fuzzer_defaults",
87    ],
88}
89
90cc_fuzz {
91    name: "keymint_authSet_fuzzer",
92    srcs: [
93        "keymint_authSet_fuzzer.cpp",
94    ],
95    defaults: [
96        "keymint_fuzzer_defaults",
97    ],
98}
99
100cc_fuzz {
101    name: "keymint_remote_prov_fuzzer",
102    srcs: [
103        "keymint_remote_prov_fuzzer.cpp",
104    ],
105    defaults: [
106        "keymint_fuzzer_defaults",
107        "keymint_remote_fuzzer_defaults",
108    ],
109}
110
111cc_fuzz {
112    name: "keymint_rkpsupport_fuzzer",
113    srcs: [
114        "keymint_rkpsupport_fuzzer.cpp",
115    ],
116    defaults: [
117        "keymint_fuzzer_defaults",
118        "keymint_remote_fuzzer_defaults",
119    ],
120}
121