blob: d8ccb63000bda6816692ea66d8ad2baec786c60b [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",
David Drysdale38859772024-01-09 15:12:31 +000037 "libcoset",
David Drysdalec3aa4422023-12-18 16:29:18 +000038 "liblog_rust",
39 "libsecretkeeper_core_nostd",
40 "libsecretkeeper_comm_nostd",
41 ],
42}
43
Shikha Panwareb223ba2023-10-19 14:54:06 +000044rust_binary {
45 name: "android.hardware.security.secretkeeper-service.nonsecure",
46 relative_install_path: "hw",
47 vendor: true,
Jooyung Hanbc192292023-11-29 14:27:07 +090048 installable: false, // install APEX
49 prefer_rlib: true,
David Drysdale8898d2e2023-11-07 15:20:15 +000050 defaults: [
51 "authgraph_use_latest_hal_aidl_rust",
52 ],
Shikha Panwareb223ba2023-10-19 14:54:06 +000053 rustlibs: [
54 "android.hardware.security.secretkeeper-V1-rust",
55 "libandroid_logger",
56 "libbinder_rs",
57 "liblog_rust",
David Drysdale8898d2e2023-11-07 15:20:15 +000058 "libsecretkeeper_hal",
David Drysdalec3aa4422023-12-18 16:29:18 +000059 "libsecretkeeper_nonsecure",
Shikha Panwareb223ba2023-10-19 14:54:06 +000060 ],
61 srcs: [
62 "src/main.rs",
63 ],
64}
Jooyung Hanbc192292023-11-29 14:27:07 +090065
David Drysdalec3aa4422023-12-18 16:29:18 +000066rust_fuzz {
67 name: "android.hardware.security.secretkeeper-service.nonsecure_fuzzer",
68 rustlibs: [
69 "libsecretkeeper_hal",
70 "libsecretkeeper_nonsecure",
71 "libbinder_random_parcel_rs",
72 "libbinder_rs",
73 ],
74 srcs: ["src/fuzzer.rs"],
75 fuzz_config: {
76 cc: [
77 "alanstokes@google.com",
78 "drysdale@google.com",
79 "shikhapanwar@google.com",
80 ],
81 },
82}
83
Jooyung Hanbc192292023-11-29 14:27:07 +090084prebuilt_etc {
85 name: "secretkeeper.rc",
86 src: "secretkeeper.rc",
87 installable: false,
88}
89
90prebuilt_etc {
91 name: "secretkeeper.xml",
92 src: "secretkeeper.xml",
93 sub_dir: "vintf",
94 installable: false,
95}
96
97apex {
98 name: "com.android.hardware.security.secretkeeper",
99 manifest: "apex_manifest.json",
100 file_contexts: "apex_file_contexts",
101 key: "com.android.hardware.key",
102 certificate: ":com.android.hardware.certificate",
103 vendor: true,
104 updatable: false,
105
106 binaries: [
107 "android.hardware.security.secretkeeper-service.nonsecure",
108 ],
109 prebuilts: [
110 "secretkeeper.rc",
111 "secretkeeper.xml",
112 ],
113}