blob: d399bf86d00501e44b6413e400fae08450d87a99 [file] [log] [blame]
David Drysdale8e1c2672023-11-10 19:12:18 +00001//
2// Copyright (C) 2022 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
16package {
17 default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20rust_binary {
21 name: "android.hardware.security.secretkeeper.trusty",
22 relative_install_path: "hw",
23 vendor: true,
24 init_rc: ["android.hardware.security.secretkeeper.trusty.rc"],
25 vintf_fragments: ["android.hardware.security.secretkeeper.trusty.xml"],
26 srcs: [
27 "src/hal_main.rs",
28 ],
29 rustlibs: [
Matt Gilbride7a1cf9a2024-12-03 22:44:52 +000030 "android.hardware.security.secretkeeper-V1-rust",
David Drysdale8e1c2672023-11-10 19:12:18 +000031 "libandroid_logger",
David Drysdale8e1c2672023-11-10 19:12:18 +000032 "libauthgraph_hal",
David Drysdale7171c672024-01-22 15:03:14 +000033 "libauthgraph_wire",
34 "libbinder_rs",
David Drysdale8e1c2672023-11-10 19:12:18 +000035 "liblibc",
36 "liblog_rust",
Matt Gilbride7a1cf9a2024-12-03 22:44:52 +000037 "libsecretkeeper_hal_v1",
David Drysdale7171c672024-01-22 15:03:14 +000038 "libtrusty-rs",
David Drysdale8e1c2672023-11-10 19:12:18 +000039 ],
David Drysdale8e1c2672023-11-10 19:12:18 +000040 prefer_rlib: true,
41}
David Drysdale36dfed92024-01-11 10:00:48 +000042
43cc_defaults {
44 name: "trusty_secretkeeper_fuzz_defaults",
45 srcs: [":trusty_tipc_fuzzer"],
46 fuzz_config: {
47 cc: [
48 "alanstokes@google.com",
49 "drysdale@google.com",
50 "shikhapanwar@google.com",
51 ],
52 componentid: 867125,
53 // TODO: add Secretkeeper hotlist
54 // hotlists: [""],
55 },
56}
57
58cc_fuzz {
59 name: "trusty_secretkeeper_sk_fuzzer",
60 defaults: [
61 "trusty_fuzzer_defaults",
62 "trusty_secretkeeper_fuzz_defaults",
63 ],
64 cflags: [
65 "-DTRUSTY_APP_PORT=\"com.android.trusty.secretkeeper\"",
66 "-DTRUSTY_APP_UUID=\"4582bf12-1f7d-4830-9be5-36e6bd91c2c6\"",
67 "-DTRUSTY_APP_FILENAME=\"secretkeeper_app.syms.elf\"",
68 ],
69}
70
71cc_fuzz {
72 name: "trusty_secretkeeper_ag_fuzzer",
73 defaults: [
74 "trusty_fuzzer_defaults",
75 "trusty_secretkeeper_fuzz_defaults",
76 ],
77 cflags: [
78 "-DTRUSTY_APP_PORT=\"com.android.trusty.secretkeeper.authgraph\"",
79 "-DTRUSTY_APP_UUID=\"4582bf12-1f7d-4830-9be5-36e6bd91c2c6\"",
80 "-DTRUSTY_APP_FILENAME=\"secretkeeper_app.syms.elf\"",
81 ],
82}
83
84cc_fuzz {
85 name: "trusty_secretkeeper_bl_fuzzer",
86 defaults: [
87 "trusty_fuzzer_defaults",
88 "trusty_secretkeeper_fuzz_defaults",
89 ],
90 cflags: [
91 "-DTRUSTY_APP_PORT=\"com.android.trusty.secretkeeper.bootloader\"",
92 "-DTRUSTY_APP_UUID=\"4582bf12-1f7d-4830-9be5-36e6bd91c2c6\"",
93 "-DTRUSTY_APP_FILENAME=\"secretkeeper_app.syms.elf\"",
94 ],
95}