blob: 70363ef415e1f0e67289dae800e273b57faafeed [file] [log] [blame]
Janis Danisevskis43c89712020-08-03 23:42:42 +00001// Copyright 2020, The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15rust_library {
16 name: "libkeystore2",
17 crate_name: "keystore2",
18 srcs: ["src/lib.rs"],
Janis Danisevskis7d77a762020-07-20 13:03:31 -070019
20 rustlibs: [
Jeongik Cha9f632c62021-01-23 09:33:35 +090021 "android.hardware.security.keymint-V1-rust",
22 "android.hardware.security.secureclock-V1-rust",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080023 "android.security.apc-rust",
Janis Danisevskis9f10a6a2021-01-18 16:45:21 +000024 "android.security.authorization-rust",
Joel Galensonde386b42020-09-30 10:53:05 -070025 "android.security.compat-rust",
Jeongik Cha9f632c62021-01-23 09:33:35 +090026 "android.system.keystore2-V1-rust",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070027 "libanyhow",
Janis Danisevskise24f3472020-08-12 17:58:49 -070028 "libbinder_rs",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080029 "libkeystore2_apc_compat-rust",
Janis Danisevskisb42fc182020-12-15 08:41:27 -080030 "libkeystore2_crypto_rust",
Joel Galensonde386b42020-09-30 10:53:05 -070031 "libkeystore2_km_compat",
Janis Danisevskisce995432020-07-21 12:22:34 -070032 "libkeystore2_selinux",
Janis Danisevskis4ad056f2020-08-05 19:46:46 +000033 "liblazy_static",
Hasini Gunasinghe557b1032020-11-10 01:35:30 +000034 "liblibc",
Joel Galenson0891bc12020-07-20 10:37:03 -070035 "liblibsqlite3_sys",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070036 "liblog_rust",
Joel Galenson0891bc12020-07-20 10:37:03 -070037 "librand",
Joel Galenson26f4d012020-07-17 14:57:21 -070038 "librusqlite",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070039 "libthiserror",
40 ],
Janis Danisevskis43c89712020-08-03 23:42:42 +000041}
42
Janis Danisevskis2a8330a2021-01-20 15:34:26 -080043rust_library {
44 name: "libkeystore2_test_utils",
45 crate_name: "keystore2_test_utils",
46 srcs: ["test_utils/lib.rs"],
47 rustlibs: [
48 "liblog_rust",
49 "librand",
50 ]
51}
52
Janis Danisevskis43c89712020-08-03 23:42:42 +000053rust_test {
54 name: "keystore2_test",
Joel Galenson26f4d012020-07-17 14:57:21 -070055 crate_name: "keystore2",
Janis Danisevskis43c89712020-08-03 23:42:42 +000056 srcs: ["src/lib.rs"],
Joel Galenson3f78dd82021-01-20 16:21:30 -080057 test_suites: ["general-tests"],
58 auto_gen_config: true,
Janis Danisevskis7d77a762020-07-20 13:03:31 -070059 rustlibs: [
Jeongik Cha9f632c62021-01-23 09:33:35 +090060 "android.hardware.security.keymint-V1-rust",
61 "android.hardware.security.secureclock-V1-rust",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080062 "android.security.apc-rust",
Janis Danisevskis9f10a6a2021-01-18 16:45:21 +000063 "android.security.authorization-rust",
Joel Galensonde386b42020-09-30 10:53:05 -070064 "android.security.compat-rust",
Jeongik Cha9f632c62021-01-23 09:33:35 +090065 "android.system.keystore2-V1-rust",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070066 "libandroid_logger",
67 "libanyhow",
Janis Danisevskise24f3472020-08-12 17:58:49 -070068 "libbinder_rs",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080069 "libkeystore2_apc_compat-rust",
Janis Danisevskisb42fc182020-12-15 08:41:27 -080070 "libkeystore2_crypto_rust",
Joel Galensonde386b42020-09-30 10:53:05 -070071 "libkeystore2_km_compat",
Janis Danisevskisce995432020-07-21 12:22:34 -070072 "libkeystore2_selinux",
Janis Danisevskis2a8330a2021-01-20 15:34:26 -080073 "libkeystore2_test_utils",
Janis Danisevskis4ad056f2020-08-05 19:46:46 +000074 "liblazy_static",
Hasini Gunasinghe557b1032020-11-10 01:35:30 +000075 "liblibc",
Joel Galenson0891bc12020-07-20 10:37:03 -070076 "liblibsqlite3_sys",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070077 "liblog_rust",
Janis Danisevskisbf15d732020-12-08 10:35:26 -080078 "librand",
Joel Galenson26f4d012020-07-17 14:57:21 -070079 "librusqlite",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070080 "libthiserror",
81 ],
Janis Danisevskis43c89712020-08-03 23:42:42 +000082}
Janis Danisevskis652f3812020-08-04 00:01:12 +000083
Janis Danisevskis1af91262020-08-10 14:58:08 -070084rust_binary {
85 name: "keystore2",
86 srcs: ["src/keystore2_main.rs"],
87 rustlibs: [
88 "libandroid_logger",
89 "libbinder_rs",
90 "libkeystore2",
91 "liblog_rust",
92 ],
93 init_rc: ["keystore2.rc"],
94}