blob: 134afc9cce9d77e92441ba810b6c9316cd5bc198 [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 {
Aditya Choudharyad2ba1b2024-02-05 15:45:22 +000018 default_team: "trendy_team_virtualization",
Shikha Panwareb223ba2023-10-19 14:54:06 +000019 default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
David Drysdalec3aa4422023-12-18 16:29:18 +000022rust_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 Gilbridec8232332024-11-13 12:24:36 +000031 "secretkeeper_use_latest_hal_aidl_rust",
David Drysdalec3aa4422023-12-18 16:29:18 +000032 ],
33 rustlibs: [
David Drysdalec3aa4422023-12-18 16:29:18 +000034 "libauthgraph_boringssl",
35 "libauthgraph_core",
36 "libauthgraph_hal",
37 "libbinder_rs",
David Drysdale38859772024-01-09 15:12:31 +000038 "libcoset",
David Drysdalec3aa4422023-12-18 16:29:18 +000039 "liblog_rust",
40 "libsecretkeeper_core_nostd",
41 "libsecretkeeper_comm_nostd",
42 ],
43}
44
Shikha Panwareb223ba2023-10-19 14:54:06 +000045rust_binary {
46 name: "android.hardware.security.secretkeeper-service.nonsecure",
47 relative_install_path: "hw",
48 vendor: true,
Jooyung Hanbc192292023-11-29 14:27:07 +090049 installable: false, // install APEX
50 prefer_rlib: true,
David Drysdale8898d2e2023-11-07 15:20:15 +000051 defaults: [
52 "authgraph_use_latest_hal_aidl_rust",
Matt Gilbridec8232332024-11-13 12:24:36 +000053 "secretkeeper_use_latest_hal_aidl_rust",
David Drysdale8898d2e2023-11-07 15:20:15 +000054 ],
Shikha Panwareb223ba2023-10-19 14:54:06 +000055 rustlibs: [
Shikha Panwareb223ba2023-10-19 14:54:06 +000056 "libandroid_logger",
57 "libbinder_rs",
58 "liblog_rust",
David Drysdale8898d2e2023-11-07 15:20:15 +000059 "libsecretkeeper_hal",
David Drysdalec3aa4422023-12-18 16:29:18 +000060 "libsecretkeeper_nonsecure",
Shikha Panwareb223ba2023-10-19 14:54:06 +000061 ],
62 srcs: [
63 "src/main.rs",
64 ],
65}
Jooyung Hanbc192292023-11-29 14:27:07 +090066
David Drysdalec3aa4422023-12-18 16:29:18 +000067rust_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 Hanbc192292023-11-29 14:27:07 +090085prebuilt_etc {
86 name: "secretkeeper.rc",
87 src: "secretkeeper.rc",
88 installable: false,
89}
90
91prebuilt_etc {
92 name: "secretkeeper.xml",
93 src: "secretkeeper.xml",
94 sub_dir: "vintf",
95 installable: false,
96}
97
98apex {
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}