xref: /aosp_15_r20/system/security/keystore/tests/fuzzer/Android.bp (revision e1997b9af69e3155ead6e072d106a0077849ffba)
1*e1997b9aSAndroid Build Coastguard Worker/*
2*e1997b9aSAndroid Build Coastguard Worker * Copyright (C) 2021 The Android Open Source Project
3*e1997b9aSAndroid Build Coastguard Worker *
4*e1997b9aSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License");
5*e1997b9aSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License.
6*e1997b9aSAndroid Build Coastguard Worker * You may obtain a copy of the License at:
7*e1997b9aSAndroid Build Coastguard Worker *
8*e1997b9aSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0
9*e1997b9aSAndroid Build Coastguard Worker *
10*e1997b9aSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software
11*e1997b9aSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS,
12*e1997b9aSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*e1997b9aSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and
14*e1997b9aSAndroid Build Coastguard Worker * limitations under the License.
15*e1997b9aSAndroid Build Coastguard Worker */
16*e1997b9aSAndroid Build Coastguard Worker
17*e1997b9aSAndroid Build Coastguard Workerpackage {
18*e1997b9aSAndroid Build Coastguard Worker    default_team: "trendy_team_android_hardware_backed_security",
19*e1997b9aSAndroid Build Coastguard Worker    // See: http://go/android-license-faq
20*e1997b9aSAndroid Build Coastguard Worker    // A large-scale-change added 'default_applicable_licenses' to import
21*e1997b9aSAndroid Build Coastguard Worker    // all of the 'license_kinds' from "system_security_license"
22*e1997b9aSAndroid Build Coastguard Worker    // to get the below license kinds:
23*e1997b9aSAndroid Build Coastguard Worker    //   SPDX-license-identifier-Apache-2.0
24*e1997b9aSAndroid Build Coastguard Worker    default_applicable_licenses: ["system_security_license"],
25*e1997b9aSAndroid Build Coastguard Worker}
26*e1997b9aSAndroid Build Coastguard Worker
27*e1997b9aSAndroid Build Coastguard Workercc_fuzz {
28*e1997b9aSAndroid Build Coastguard Worker    name: "keystoreGetWifiHidl_fuzzer",
29*e1997b9aSAndroid Build Coastguard Worker    vendor: true,
30*e1997b9aSAndroid Build Coastguard Worker    srcs: [
31*e1997b9aSAndroid Build Coastguard Worker        "keystoreGetWifiHidl_fuzzer.cpp",
32*e1997b9aSAndroid Build Coastguard Worker    ],
33*e1997b9aSAndroid Build Coastguard Worker    static_libs: [
34*e1997b9aSAndroid Build Coastguard Worker        "libkeystore-wifi-hidl",
35*e1997b9aSAndroid Build Coastguard Worker    ],
36*e1997b9aSAndroid Build Coastguard Worker    shared_libs: [
37*e1997b9aSAndroid Build Coastguard Worker        "[email protected]",
38*e1997b9aSAndroid Build Coastguard Worker        "libhidlbase",
39*e1997b9aSAndroid Build Coastguard Worker        "liblog",
40*e1997b9aSAndroid Build Coastguard Worker        "libutils",
41*e1997b9aSAndroid Build Coastguard Worker    ],
42*e1997b9aSAndroid Build Coastguard Worker    fuzz_config: {
43*e1997b9aSAndroid Build Coastguard Worker        cc: [
44*e1997b9aSAndroid Build Coastguard Worker            "[email protected]",
45*e1997b9aSAndroid Build Coastguard Worker        ],
46*e1997b9aSAndroid Build Coastguard Worker        componentid: 1084732,
47*e1997b9aSAndroid Build Coastguard Worker        hotlists: [
48*e1997b9aSAndroid Build Coastguard Worker            "4593311",
49*e1997b9aSAndroid Build Coastguard Worker        ],
50*e1997b9aSAndroid Build Coastguard Worker        description: "The fuzzer targets the APIs of libkeystore-wifi-hidl",
51*e1997b9aSAndroid Build Coastguard Worker        vector: "local_no_privileges_required",
52*e1997b9aSAndroid Build Coastguard Worker        service_privilege: "privileged",
53*e1997b9aSAndroid Build Coastguard Worker        users: "multi_user",
54*e1997b9aSAndroid Build Coastguard Worker        fuzzed_code_usage: "shipped",
55*e1997b9aSAndroid Build Coastguard Worker    },
56*e1997b9aSAndroid Build Coastguard Worker}
57*e1997b9aSAndroid Build Coastguard Worker
58*e1997b9aSAndroid Build Coastguard Workercc_defaults {
59*e1997b9aSAndroid Build Coastguard Worker    name: "keystoreAttestation_defaults",
60*e1997b9aSAndroid Build Coastguard Worker    static_libs: [
61*e1997b9aSAndroid Build Coastguard Worker        "libkeystore-attestation-application-id",
62*e1997b9aSAndroid Build Coastguard Worker        "liblog",
63*e1997b9aSAndroid Build Coastguard Worker        "libbase",
64*e1997b9aSAndroid Build Coastguard Worker        "libhidlbase",
65*e1997b9aSAndroid Build Coastguard Worker    ],
66*e1997b9aSAndroid Build Coastguard Worker    shared_libs: [
67*e1997b9aSAndroid Build Coastguard Worker        "android.security.aaid_aidl-cpp",
68*e1997b9aSAndroid Build Coastguard Worker        "libbinder",
69*e1997b9aSAndroid Build Coastguard Worker        "libcrypto",
70*e1997b9aSAndroid Build Coastguard Worker        "libutils",
71*e1997b9aSAndroid Build Coastguard Worker    ],
72*e1997b9aSAndroid Build Coastguard Worker    fuzz_config: {
73*e1997b9aSAndroid Build Coastguard Worker        cc: [
74*e1997b9aSAndroid Build Coastguard Worker            "[email protected]",
75*e1997b9aSAndroid Build Coastguard Worker        ],
76*e1997b9aSAndroid Build Coastguard Worker        componentid: 1084732,
77*e1997b9aSAndroid Build Coastguard Worker        hotlists: [
78*e1997b9aSAndroid Build Coastguard Worker            "4593311",
79*e1997b9aSAndroid Build Coastguard Worker        ],
80*e1997b9aSAndroid Build Coastguard Worker        description: "The fuzzer targets the APIs of libkeystore-attestation-application-id",
81*e1997b9aSAndroid Build Coastguard Worker        vector: "local_no_privileges_required",
82*e1997b9aSAndroid Build Coastguard Worker        service_privilege: "privileged",
83*e1997b9aSAndroid Build Coastguard Worker        users: "multi_user",
84*e1997b9aSAndroid Build Coastguard Worker        fuzzed_code_usage: "shipped",
85*e1997b9aSAndroid Build Coastguard Worker    },
86*e1997b9aSAndroid Build Coastguard Worker}
87*e1997b9aSAndroid Build Coastguard Worker
88*e1997b9aSAndroid Build Coastguard Workercc_fuzz {
89*e1997b9aSAndroid Build Coastguard Worker    name: "keystoreSignature_fuzzer",
90*e1997b9aSAndroid Build Coastguard Worker    srcs: [
91*e1997b9aSAndroid Build Coastguard Worker        "keystoreSignature_fuzzer.cpp",
92*e1997b9aSAndroid Build Coastguard Worker    ],
93*e1997b9aSAndroid Build Coastguard Worker    defaults: [
94*e1997b9aSAndroid Build Coastguard Worker        "keystoreAttestation_defaults",
95*e1997b9aSAndroid Build Coastguard Worker    ],
96*e1997b9aSAndroid Build Coastguard Worker}
97*e1997b9aSAndroid Build Coastguard Worker
98*e1997b9aSAndroid Build Coastguard Workercc_fuzz {
99*e1997b9aSAndroid Build Coastguard Worker    name: "keystorePackageInfo_fuzzer",
100*e1997b9aSAndroid Build Coastguard Worker    srcs: [
101*e1997b9aSAndroid Build Coastguard Worker        "keystorePackageInfo_fuzzer.cpp",
102*e1997b9aSAndroid Build Coastguard Worker    ],
103*e1997b9aSAndroid Build Coastguard Worker    defaults: [
104*e1997b9aSAndroid Build Coastguard Worker        "keystoreAttestation_defaults",
105*e1997b9aSAndroid Build Coastguard Worker    ],
106*e1997b9aSAndroid Build Coastguard Worker}
107*e1997b9aSAndroid Build Coastguard Worker
108*e1997b9aSAndroid Build Coastguard Workercc_fuzz {
109*e1997b9aSAndroid Build Coastguard Worker    name: "keystoreApplicationId_fuzzer",
110*e1997b9aSAndroid Build Coastguard Worker    srcs: [
111*e1997b9aSAndroid Build Coastguard Worker        "keystoreApplicationId_fuzzer.cpp",
112*e1997b9aSAndroid Build Coastguard Worker    ],
113*e1997b9aSAndroid Build Coastguard Worker    defaults: [
114*e1997b9aSAndroid Build Coastguard Worker        "keystoreAttestation_defaults",
115*e1997b9aSAndroid Build Coastguard Worker    ],
116*e1997b9aSAndroid Build Coastguard Worker}
117*e1997b9aSAndroid Build Coastguard Worker
118*e1997b9aSAndroid Build Coastguard Workercc_fuzz {
119*e1997b9aSAndroid Build Coastguard Worker    name: "keystoreAttestationId_fuzzer",
120*e1997b9aSAndroid Build Coastguard Worker    srcs: [
121*e1997b9aSAndroid Build Coastguard Worker        "keystoreAttestationId_fuzzer.cpp",
122*e1997b9aSAndroid Build Coastguard Worker    ],
123*e1997b9aSAndroid Build Coastguard Worker    defaults: [
124*e1997b9aSAndroid Build Coastguard Worker        "keystoreAttestation_defaults",
125*e1997b9aSAndroid Build Coastguard Worker    ],
126*e1997b9aSAndroid Build Coastguard Worker}
127