Shikha Panwar | eb223ba | 2023-10-19 14:54:06 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2023 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 | package { |
Aditya Choudhary | ad2ba1b | 2024-02-05 15:45:22 +0000 | [diff] [blame] | 18 | default_team: "trendy_team_virtualization", |
Shikha Panwar | eb223ba | 2023-10-19 14:54:06 +0000 | [diff] [blame] | 19 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 20 | } |
| 21 | |
David Drysdale | c3aa442 | 2023-12-18 16:29:18 +0000 | [diff] [blame] | 22 | rust_library { |
| 23 | name: "libsecretkeeper_nonsecure", |
| 24 | crate_name: "secretkeeper_nonsecure", |
| 25 | srcs: [ |
| 26 | "src/lib.rs", |
| 27 | ], |
| 28 | vendor_available: true, |
| 29 | defaults: [ |
| 30 | "authgraph_use_latest_hal_aidl_rust", |
Matt Gilbride | c823233 | 2024-11-13 12:24:36 +0000 | [diff] [blame] | 31 | "secretkeeper_use_latest_hal_aidl_rust", |
David Drysdale | c3aa442 | 2023-12-18 16:29:18 +0000 | [diff] [blame] | 32 | ], |
| 33 | rustlibs: [ |
David Drysdale | c3aa442 | 2023-12-18 16:29:18 +0000 | [diff] [blame] | 34 | "libauthgraph_boringssl", |
| 35 | "libauthgraph_core", |
| 36 | "libauthgraph_hal", |
| 37 | "libbinder_rs", |
David Drysdale | 3885977 | 2024-01-09 15:12:31 +0000 | [diff] [blame] | 38 | "libcoset", |
David Drysdale | c3aa442 | 2023-12-18 16:29:18 +0000 | [diff] [blame] | 39 | "liblog_rust", |
| 40 | "libsecretkeeper_core_nostd", |
| 41 | "libsecretkeeper_comm_nostd", |
| 42 | ], |
| 43 | } |
| 44 | |
Shikha Panwar | eb223ba | 2023-10-19 14:54:06 +0000 | [diff] [blame] | 45 | rust_binary { |
| 46 | name: "android.hardware.security.secretkeeper-service.nonsecure", |
| 47 | relative_install_path: "hw", |
| 48 | vendor: true, |
Jooyung Han | bc19229 | 2023-11-29 14:27:07 +0900 | [diff] [blame] | 49 | installable: false, // install APEX |
| 50 | prefer_rlib: true, |
David Drysdale | 8898d2e | 2023-11-07 15:20:15 +0000 | [diff] [blame] | 51 | defaults: [ |
| 52 | "authgraph_use_latest_hal_aidl_rust", |
Matt Gilbride | c823233 | 2024-11-13 12:24:36 +0000 | [diff] [blame] | 53 | "secretkeeper_use_latest_hal_aidl_rust", |
David Drysdale | 8898d2e | 2023-11-07 15:20:15 +0000 | [diff] [blame] | 54 | ], |
Shikha Panwar | eb223ba | 2023-10-19 14:54:06 +0000 | [diff] [blame] | 55 | rustlibs: [ |
Shikha Panwar | eb223ba | 2023-10-19 14:54:06 +0000 | [diff] [blame] | 56 | "libandroid_logger", |
| 57 | "libbinder_rs", |
| 58 | "liblog_rust", |
David Drysdale | 8898d2e | 2023-11-07 15:20:15 +0000 | [diff] [blame] | 59 | "libsecretkeeper_hal", |
David Drysdale | c3aa442 | 2023-12-18 16:29:18 +0000 | [diff] [blame] | 60 | "libsecretkeeper_nonsecure", |
Shikha Panwar | eb223ba | 2023-10-19 14:54:06 +0000 | [diff] [blame] | 61 | ], |
| 62 | srcs: [ |
| 63 | "src/main.rs", |
| 64 | ], |
| 65 | } |
Jooyung Han | bc19229 | 2023-11-29 14:27:07 +0900 | [diff] [blame] | 66 | |
David Drysdale | c3aa442 | 2023-12-18 16:29:18 +0000 | [diff] [blame] | 67 | rust_fuzz { |
| 68 | name: "android.hardware.security.secretkeeper-service.nonsecure_fuzzer", |
| 69 | rustlibs: [ |
| 70 | "libsecretkeeper_hal", |
| 71 | "libsecretkeeper_nonsecure", |
| 72 | "libbinder_random_parcel_rs", |
| 73 | "libbinder_rs", |
| 74 | ], |
| 75 | srcs: ["src/fuzzer.rs"], |
| 76 | fuzz_config: { |
| 77 | cc: [ |
| 78 | "alanstokes@google.com", |
| 79 | "drysdale@google.com", |
| 80 | "shikhapanwar@google.com", |
| 81 | ], |
| 82 | }, |
| 83 | } |
| 84 | |
Jooyung Han | bc19229 | 2023-11-29 14:27:07 +0900 | [diff] [blame] | 85 | prebuilt_etc { |
| 86 | name: "secretkeeper.rc", |
| 87 | src: "secretkeeper.rc", |
| 88 | installable: false, |
| 89 | } |
| 90 | |
| 91 | prebuilt_etc { |
| 92 | name: "secretkeeper.xml", |
| 93 | src: "secretkeeper.xml", |
| 94 | sub_dir: "vintf", |
| 95 | installable: false, |
| 96 | } |
| 97 | |
| 98 | apex { |
| 99 | name: "com.android.hardware.security.secretkeeper", |
| 100 | manifest: "apex_manifest.json", |
| 101 | file_contexts: "apex_file_contexts", |
| 102 | key: "com.android.hardware.key", |
| 103 | certificate: ":com.android.hardware.certificate", |
| 104 | vendor: true, |
| 105 | updatable: false, |
| 106 | |
| 107 | binaries: [ |
| 108 | "android.hardware.security.secretkeeper-service.nonsecure", |
| 109 | ], |
| 110 | prebuilts: [ |
| 111 | "secretkeeper.rc", |
| 112 | "secretkeeper.xml", |
| 113 | ], |
| 114 | } |