blob: 8f21c90cc1fb89b98f5cf61b8445f038c913798c [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: [
Shawn Willden708744a2020-12-11 13:05:27 +000021 "android.hardware.security.keymint-rust",
Janis Danisevskisc3a496b2021-01-05 10:37:22 -080022 "android.hardware.security.secureclock-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",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080026 "android.system.keystore2-rust",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070027 "libanyhow",
Janis Danisevskise24f3472020-08-12 17:58:49 -070028 "libbinder_rs",
Janis Danisevskis212c68b2021-01-14 22:29:28 -080029 "libkeystore2_aaid-rust",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080030 "libkeystore2_apc_compat-rust",
Janis Danisevskisb42fc182020-12-15 08:41:27 -080031 "libkeystore2_crypto_rust",
Joel Galensonde386b42020-09-30 10:53:05 -070032 "libkeystore2_km_compat",
Janis Danisevskisce995432020-07-21 12:22:34 -070033 "libkeystore2_selinux",
Janis Danisevskis4ad056f2020-08-05 19:46:46 +000034 "liblazy_static",
Hasini Gunasinghe557b1032020-11-10 01:35:30 +000035 "liblibc",
Joel Galenson0891bc12020-07-20 10:37:03 -070036 "liblibsqlite3_sys",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070037 "liblog_rust",
Joel Galenson0891bc12020-07-20 10:37:03 -070038 "librand",
Joel Galenson26f4d012020-07-17 14:57:21 -070039 "librusqlite",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070040 "libthiserror",
41 ],
Janis Danisevskis43c89712020-08-03 23:42:42 +000042}
43
44rust_test {
45 name: "keystore2_test",
Joel Galenson26f4d012020-07-17 14:57:21 -070046 crate_name: "keystore2",
Janis Danisevskis43c89712020-08-03 23:42:42 +000047 srcs: ["src/lib.rs"],
Joel Galenson3f78dd82021-01-20 16:21:30 -080048 test_suites: ["general-tests"],
49 auto_gen_config: true,
Janis Danisevskis7d77a762020-07-20 13:03:31 -070050 rustlibs: [
Shawn Willden708744a2020-12-11 13:05:27 +000051 "android.hardware.security.keymint-rust",
Janis Danisevskisc3a496b2021-01-05 10:37:22 -080052 "android.hardware.security.secureclock-rust",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080053 "android.security.apc-rust",
Janis Danisevskis9f10a6a2021-01-18 16:45:21 +000054 "android.security.authorization-rust",
Joel Galensonde386b42020-09-30 10:53:05 -070055 "android.security.compat-rust",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080056 "android.system.keystore2-rust",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070057 "libandroid_logger",
58 "libanyhow",
Janis Danisevskise24f3472020-08-12 17:58:49 -070059 "libbinder_rs",
Janis Danisevskis212c68b2021-01-14 22:29:28 -080060 "libkeystore2_aaid-rust",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080061 "libkeystore2_apc_compat-rust",
Janis Danisevskisb42fc182020-12-15 08:41:27 -080062 "libkeystore2_crypto_rust",
Joel Galensonde386b42020-09-30 10:53:05 -070063 "libkeystore2_km_compat",
Janis Danisevskisce995432020-07-21 12:22:34 -070064 "libkeystore2_selinux",
Janis Danisevskis4ad056f2020-08-05 19:46:46 +000065 "liblazy_static",
Hasini Gunasinghe557b1032020-11-10 01:35:30 +000066 "liblibc",
Joel Galenson0891bc12020-07-20 10:37:03 -070067 "liblibsqlite3_sys",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070068 "liblog_rust",
Janis Danisevskisbf15d732020-12-08 10:35:26 -080069 "librand",
Joel Galenson26f4d012020-07-17 14:57:21 -070070 "librusqlite",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070071 "libthiserror",
72 ],
Janis Danisevskis43c89712020-08-03 23:42:42 +000073}
Janis Danisevskis652f3812020-08-04 00:01:12 +000074
Janis Danisevskis1af91262020-08-10 14:58:08 -070075rust_binary {
76 name: "keystore2",
77 srcs: ["src/keystore2_main.rs"],
78 rustlibs: [
79 "libandroid_logger",
80 "libbinder_rs",
81 "libkeystore2",
82 "liblog_rust",
83 ],
84 init_rc: ["keystore2.rc"],
85}