blob: 1d75c74e476eb41b23f896483900192361049204 [file] [log] [blame]
Shikha Panwareb223ba2023-10-19 14:54:06 +00001/*
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
17package {
18 default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
David Drysdalec3aa4422023-12-18 16:29:18 +000021rust_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 Panwareb223ba2023-10-19 14:54:06 +000043rust_binary {
44 name: "android.hardware.security.secretkeeper-service.nonsecure",
45 relative_install_path: "hw",
46 vendor: true,
Jooyung Hanbc192292023-11-29 14:27:07 +090047 installable: false, // install APEX
48 prefer_rlib: true,
David Drysdale8898d2e2023-11-07 15:20:15 +000049 defaults: [
50 "authgraph_use_latest_hal_aidl_rust",
51 ],
Shikha Panwareb223ba2023-10-19 14:54:06 +000052 rustlibs: [
53 "android.hardware.security.secretkeeper-V1-rust",
54 "libandroid_logger",
55 "libbinder_rs",
56 "liblog_rust",
David Drysdale8898d2e2023-11-07 15:20:15 +000057 "libsecretkeeper_hal",
David Drysdalec3aa4422023-12-18 16:29:18 +000058 "libsecretkeeper_nonsecure",
Shikha Panwareb223ba2023-10-19 14:54:06 +000059 ],
60 srcs: [
61 "src/main.rs",
62 ],
63}
Jooyung Hanbc192292023-11-29 14:27:07 +090064
David Drysdalec3aa4422023-12-18 16:29:18 +000065rust_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 Hanbc192292023-11-29 14:27:07 +090083prebuilt_etc {
84 name: "secretkeeper.rc",
85 src: "secretkeeper.rc",
86 installable: false,
87}
88
89prebuilt_etc {
90 name: "secretkeeper.xml",
91 src: "secretkeeper.xml",
92 sub_dir: "vintf",
93 installable: false,
94}
95
96apex {
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}