1// 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: [ 30 "android.hardware.security.secretkeeper-V1-rust", 31 "libandroid_logger", 32 "libauthgraph_hal", 33 "libauthgraph_wire", 34 "libbinder_rs", 35 "liblibc", 36 "liblog_rust", 37 "libsecretkeeper_hal_v1", 38 "libtrusty-rs", 39 ], 40 prefer_rlib: true, 41} 42 43cc_defaults { 44 name: "trusty_secretkeeper_fuzz_defaults", 45 srcs: [":trusty_tipc_fuzzer"], 46 fuzz_config: { 47 cc: [ 48 "[email protected]", 49 "[email protected]", 50 "[email protected]", 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} 96