blob: 812d5e6a6d0038bb33160715fd258b8769721af7 [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
Bob Badour4c7858c2021-02-12 15:40:29 -080015package {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "system_security_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["system_security_license"],
22}
23
Janis Danisevskis43c89712020-08-03 23:42:42 +000024rust_library {
25 name: "libkeystore2",
26 crate_name: "keystore2",
27 srcs: ["src/lib.rs"],
Janis Danisevskis7d77a762020-07-20 13:03:31 -070028
29 rustlibs: [
Jeongik Cha9f632c62021-01-23 09:33:35 +090030 "android.hardware.security.keymint-V1-rust",
31 "android.hardware.security.secureclock-V1-rust",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080032 "android.security.apc-rust",
Janis Danisevskis9f10a6a2021-01-18 16:45:21 +000033 "android.security.authorization-rust",
Joel Galensonde386b42020-09-30 10:53:05 -070034 "android.security.compat-rust",
Max Bires148c08e2020-10-13 13:41:41 -070035 "android.security.remoteprovisioning-rust",
Hasini Gunasingheda895552021-01-27 19:34:37 +000036 "android.security.usermanager-rust",
Jeongik Cha9f632c62021-01-23 09:33:35 +090037 "android.system.keystore2-V1-rust",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070038 "libanyhow",
Janis Danisevskise24f3472020-08-12 17:58:49 -070039 "libbinder_rs",
Janis Danisevskis212c68b2021-01-14 22:29:28 -080040 "libkeystore2_aaid-rust",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080041 "libkeystore2_apc_compat-rust",
Janis Danisevskisb42fc182020-12-15 08:41:27 -080042 "libkeystore2_crypto_rust",
Joel Galensonde386b42020-09-30 10:53:05 -070043 "libkeystore2_km_compat",
Janis Danisevskisce995432020-07-21 12:22:34 -070044 "libkeystore2_selinux",
Janis Danisevskis4ad056f2020-08-05 19:46:46 +000045 "liblazy_static",
Hasini Gunasinghe557b1032020-11-10 01:35:30 +000046 "liblibc",
Joel Galenson0891bc12020-07-20 10:37:03 -070047 "liblibsqlite3_sys",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070048 "liblog_rust",
Joel Galenson0891bc12020-07-20 10:37:03 -070049 "librand",
Joel Galenson26f4d012020-07-17 14:57:21 -070050 "librusqlite",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070051 "libthiserror",
52 ],
Janis Danisevskis43c89712020-08-03 23:42:42 +000053}
54
Janis Danisevskis2a8330a2021-01-20 15:34:26 -080055rust_library {
56 name: "libkeystore2_test_utils",
57 crate_name: "keystore2_test_utils",
58 srcs: ["test_utils/lib.rs"],
59 rustlibs: [
60 "liblog_rust",
61 "librand",
62 ]
63}
64
Janis Danisevskis43c89712020-08-03 23:42:42 +000065rust_test {
66 name: "keystore2_test",
Joel Galenson26f4d012020-07-17 14:57:21 -070067 crate_name: "keystore2",
Janis Danisevskis43c89712020-08-03 23:42:42 +000068 srcs: ["src/lib.rs"],
Joel Galenson3f78dd82021-01-20 16:21:30 -080069 test_suites: ["general-tests"],
70 auto_gen_config: true,
Janis Danisevskis66784c42021-01-27 08:40:25 -080071 compile_multilib: "first",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070072 rustlibs: [
Jeongik Cha9f632c62021-01-23 09:33:35 +090073 "android.hardware.security.keymint-V1-rust",
74 "android.hardware.security.secureclock-V1-rust",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080075 "android.security.apc-rust",
Janis Danisevskis9f10a6a2021-01-18 16:45:21 +000076 "android.security.authorization-rust",
Joel Galensonde386b42020-09-30 10:53:05 -070077 "android.security.compat-rust",
Max Bires148c08e2020-10-13 13:41:41 -070078 "android.security.remoteprovisioning-rust",
Hasini Gunasingheda895552021-01-27 19:34:37 +000079 "android.security.usermanager-rust",
Jeongik Cha9f632c62021-01-23 09:33:35 +090080 "android.system.keystore2-V1-rust",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070081 "libandroid_logger",
82 "libanyhow",
Janis Danisevskise24f3472020-08-12 17:58:49 -070083 "libbinder_rs",
Janis Danisevskis212c68b2021-01-14 22:29:28 -080084 "libkeystore2_aaid-rust",
Janis Danisevskis7a1cf382020-11-20 11:22:14 -080085 "libkeystore2_apc_compat-rust",
Janis Danisevskisb42fc182020-12-15 08:41:27 -080086 "libkeystore2_crypto_rust",
Joel Galensonde386b42020-09-30 10:53:05 -070087 "libkeystore2_km_compat",
Janis Danisevskisce995432020-07-21 12:22:34 -070088 "libkeystore2_selinux",
Janis Danisevskis2a8330a2021-01-20 15:34:26 -080089 "libkeystore2_test_utils",
Janis Danisevskis4ad056f2020-08-05 19:46:46 +000090 "liblazy_static",
Hasini Gunasinghe557b1032020-11-10 01:35:30 +000091 "liblibc",
Joel Galenson0891bc12020-07-20 10:37:03 -070092 "liblibsqlite3_sys",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070093 "liblog_rust",
Janis Danisevskisbf15d732020-12-08 10:35:26 -080094 "librand",
Joel Galenson26f4d012020-07-17 14:57:21 -070095 "librusqlite",
Janis Danisevskis7d77a762020-07-20 13:03:31 -070096 "libthiserror",
97 ],
Janis Danisevskis43c89712020-08-03 23:42:42 +000098}
Janis Danisevskis652f3812020-08-04 00:01:12 +000099
Janis Danisevskis1af91262020-08-10 14:58:08 -0700100rust_binary {
101 name: "keystore2",
102 srcs: ["src/keystore2_main.rs"],
103 rustlibs: [
104 "libandroid_logger",
105 "libbinder_rs",
106 "libkeystore2",
107 "liblog_rust",
108 ],
109 init_rc: ["keystore2.rc"],
110}