David Drysdale | 8e1c267 | 2023-11-10 19:12:18 +0000 | [diff] [blame] | 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 | |
| 16 | package { |
| 17 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 18 | } |
| 19 | |
| 20 | rust_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 Gilbride | 7a1cf9a | 2024-12-03 22:44:52 +0000 | [diff] [blame] | 30 | "android.hardware.security.secretkeeper-V1-rust", |
David Drysdale | 8e1c267 | 2023-11-10 19:12:18 +0000 | [diff] [blame] | 31 | "libandroid_logger", |
David Drysdale | 8e1c267 | 2023-11-10 19:12:18 +0000 | [diff] [blame] | 32 | "libauthgraph_hal", |
David Drysdale | 7171c67 | 2024-01-22 15:03:14 +0000 | [diff] [blame] | 33 | "libauthgraph_wire", |
| 34 | "libbinder_rs", |
David Drysdale | 8e1c267 | 2023-11-10 19:12:18 +0000 | [diff] [blame] | 35 | "liblibc", |
| 36 | "liblog_rust", |
Matt Gilbride | 7a1cf9a | 2024-12-03 22:44:52 +0000 | [diff] [blame] | 37 | "libsecretkeeper_hal_v1", |
David Drysdale | 7171c67 | 2024-01-22 15:03:14 +0000 | [diff] [blame] | 38 | "libtrusty-rs", |
David Drysdale | 8e1c267 | 2023-11-10 19:12:18 +0000 | [diff] [blame] | 39 | ], |
David Drysdale | 8e1c267 | 2023-11-10 19:12:18 +0000 | [diff] [blame] | 40 | prefer_rlib: true, |
| 41 | } |
David Drysdale | 36dfed9 | 2024-01-11 10:00:48 +0000 | [diff] [blame] | 42 | |
| 43 | cc_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 | |
| 58 | cc_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 | |
| 71 | cc_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 | |
| 84 | cc_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 | } |