blob: 386df74e9a9b90331a5e2d130c5d0c62a0d383e0 [file] [log] [blame]
Joel Galensonde386b42020-09-30 10:53:05 -07001// 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
Joel Galensonde386b42020-09-30 10:53:05 -070024rust_library {
25 name: "libkeystore2_km_compat",
26 crate_name: "keystore2_km_compat",
27 srcs: ["lib.rs"],
David Drysdalebdb232d2021-11-22 14:41:18 +000028 defaults: [
29 "keymint_use_latest_hal_aidl_rust",
30 ],
Joel Galensonde386b42020-09-30 10:53:05 -070031 rustlibs: [
Joel Galensonde386b42020-09-30 10:53:05 -070032 "android.security.compat-rust",
33 ],
34 shared_libs: [
35 "libkm_compat_service",
36 ]
37}
38
39rust_test {
40 name: "keystore2_km_compat_test",
41 crate_name: "keystore2",
42 srcs: ["lib.rs"],
43 test_suites: ["general-tests"],
44 auto_gen_config: true,
David Drysdalebdb232d2021-11-22 14:41:18 +000045 defaults: [
46 "keymint_use_latest_hal_aidl_rust",
47 ],
Joel Galensonde386b42020-09-30 10:53:05 -070048 rustlibs: [
Joel Galensonde386b42020-09-30 10:53:05 -070049 "android.security.compat-rust",
50 ],
51 shared_libs: [
52 "libkm_compat_service",
53 ],
54}
55
56cc_library {
57 name: "libkm_compat",
58 srcs: ["km_compat.cpp"],
David Drysdalebdb232d2021-11-22 14:41:18 +000059 defaults: [
60 "keymint_use_latest_hal_aidl_ndk_shared",
61 ],
Joel Galensonde386b42020-09-30 10:53:05 -070062 shared_libs: [
63 "android.hardware.keymaster@3.0",
64 "android.hardware.keymaster@4.0",
65 "android.hardware.keymaster@4.1",
Jiyong Park0d61dd62021-07-27 12:20:26 +090066 "android.hardware.security.secureclock-V1-ndk",
67 "android.hardware.security.sharedsecret-V1-ndk",
68 "android.security.compat-ndk",
69 "android.system.keystore2-V1-ndk",
Joel Galensonde386b42020-09-30 10:53:05 -070070 "libbase",
71 "libbinder_ndk",
72 "libcrypto",
73 "libhidlbase",
74 "libkeymaster4_1support",
David Zeuthen90b6ae32021-02-23 10:41:52 -050075 "libkeymint",
Janis Danisevskisb60c0042020-12-17 00:11:21 -080076 "libkeymint_support",
Joel Galensonde386b42020-09-30 10:53:05 -070077 "libkeystore2_crypto",
78 "libutils",
79 ],
80}
81
82cc_library {
83 name: "libkm_compat_service",
84 srcs: ["km_compat_service.cpp"],
David Drysdalebdb232d2021-11-22 14:41:18 +000085 defaults: [
86 "keymint_use_latest_hal_aidl_ndk_shared",
87 ],
Joel Galensonde386b42020-09-30 10:53:05 -070088 shared_libs: [
Jiyong Park0d61dd62021-07-27 12:20:26 +090089 "android.hardware.security.secureclock-V1-ndk",
90 "android.hardware.security.sharedsecret-V1-ndk",
91 "android.security.compat-ndk",
Joel Galensonde386b42020-09-30 10:53:05 -070092 "libbinder_ndk",
93 "libcrypto",
94 "libkm_compat",
95 "libkeymaster4_1support",
96 "libkeystore2_crypto",
97 ],
98}
99
100cc_test {
Janis Danisevskisb60c0042020-12-17 00:11:21 -0800101 name: "keystore2_km_compat_test_cpp",
Joel Galensonde386b42020-09-30 10:53:05 -0700102 cflags: [
103 "-Wall",
104 "-Werror",
105 "-Wextra",
106 ],
107 srcs: [
108 "certificate_test.cpp",
109 "gtest_main.cpp",
Janis Danisevskisb60c0042020-12-17 00:11:21 -0800110 "parameter_conversion_test.cpp",
Joel Galensonde386b42020-09-30 10:53:05 -0700111 "slot_test.cpp",
112 ],
David Drysdalebdb232d2021-11-22 14:41:18 +0000113 defaults: [
114 "keymint_use_latest_hal_aidl_ndk_shared",
115 ],
Joel Galensonde386b42020-09-30 10:53:05 -0700116 shared_libs: [
117 "android.hardware.keymaster@3.0",
118 "android.hardware.keymaster@4.0",
119 "android.hardware.keymaster@4.1",
Jiyong Park0d61dd62021-07-27 12:20:26 +0900120 "android.hardware.security.secureclock-V1-ndk",
121 "android.hardware.security.sharedsecret-V1-ndk",
122 "android.security.compat-ndk",
123 "android.system.keystore2-V1-ndk",
Joel Galensonde386b42020-09-30 10:53:05 -0700124 "libbase",
125 "libbinder_ndk",
126 "libcrypto",
127 "libhidlbase",
128 "libkeymaster4_1support",
Janis Danisevskisb60c0042020-12-17 00:11:21 -0800129 "libkeymint_support",
Joel Galensonde386b42020-09-30 10:53:05 -0700130 "libkeystore2_crypto",
131 "libkm_compat",
Joel Galenson9978cd42021-02-23 09:11:10 -0800132 "libkm_compat_service",
Joel Galensonde386b42020-09-30 10:53:05 -0700133 "libutils",
134 ],
Joel Galensonde386b42020-09-30 10:53:05 -0700135}