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