blob: 126aeffe128a95ce2cb68360135cd1143c9fbb30 [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
15rust_library {
16 name: "libkeystore2_km_compat",
17 crate_name: "keystore2_km_compat",
18 srcs: ["lib.rs"],
19
20 rustlibs: [
Jeongik Cha9f632c62021-01-23 09:33:35 +090021 "android.hardware.security.keymint-V1-rust",
Joel Galensonde386b42020-09-30 10:53:05 -070022 "android.security.compat-rust",
23 ],
24 shared_libs: [
25 "libkm_compat_service",
26 ]
27}
28
29rust_test {
30 name: "keystore2_km_compat_test",
31 crate_name: "keystore2",
32 srcs: ["lib.rs"],
33 test_suites: ["general-tests"],
34 auto_gen_config: true,
35 rustlibs: [
Jeongik Cha9f632c62021-01-23 09:33:35 +090036 "android.hardware.security.keymint-V1-rust",
Joel Galensonde386b42020-09-30 10:53:05 -070037 "android.security.compat-rust",
38 ],
39 shared_libs: [
40 "libkm_compat_service",
41 ],
42}
43
44cc_library {
45 name: "libkm_compat",
46 srcs: ["km_compat.cpp"],
47 shared_libs: [
48 "android.hardware.keymaster@3.0",
49 "android.hardware.keymaster@4.0",
50 "android.hardware.keymaster@4.1",
51 "android.hardware.security.keymint-unstable-ndk_platform",
Joel Galensonf21c0022020-12-11 14:37:52 -080052 "android.hardware.security.secureclock-unstable-ndk_platform",
53 "android.hardware.security.sharedsecret-unstable-ndk_platform",
Joel Galensonde386b42020-09-30 10:53:05 -070054 "android.security.compat-ndk_platform",
55 "android.system.keystore2-ndk_platform",
56 "libbase",
57 "libbinder_ndk",
58 "libcrypto",
59 "libhidlbase",
60 "libkeymaster4_1support",
Janis Danisevskisb60c0042020-12-17 00:11:21 -080061 "libkeymint_support",
Joel Galensonde386b42020-09-30 10:53:05 -070062 "libkeystore2_crypto",
63 "libutils",
64 ],
65}
66
67cc_library {
68 name: "libkm_compat_service",
69 srcs: ["km_compat_service.cpp"],
70 shared_libs: [
Joel Galensonf21c0022020-12-11 14:37:52 -080071 "android.hardware.security.keymint-unstable-ndk_platform",
72 "android.hardware.security.secureclock-unstable-ndk_platform",
73 "android.hardware.security.sharedsecret-unstable-ndk_platform",
Joel Galensonde386b42020-09-30 10:53:05 -070074 "android.security.compat-ndk_platform",
75 "libbinder_ndk",
76 "libcrypto",
77 "libkm_compat",
78 "libkeymaster4_1support",
79 "libkeystore2_crypto",
80 ],
81}
82
83cc_test {
Janis Danisevskisb60c0042020-12-17 00:11:21 -080084 name: "keystore2_km_compat_test_cpp",
Joel Galensonde386b42020-09-30 10:53:05 -070085 cflags: [
86 "-Wall",
87 "-Werror",
88 "-Wextra",
89 ],
90 srcs: [
91 "certificate_test.cpp",
92 "gtest_main.cpp",
Janis Danisevskisb60c0042020-12-17 00:11:21 -080093 "parameter_conversion_test.cpp",
Joel Galensonde386b42020-09-30 10:53:05 -070094 "slot_test.cpp",
95 ],
96 shared_libs: [
97 "android.hardware.keymaster@3.0",
98 "android.hardware.keymaster@4.0",
99 "android.hardware.keymaster@4.1",
100 "android.hardware.security.keymint-unstable-ndk_platform",
Joel Galensonf21c0022020-12-11 14:37:52 -0800101 "android.hardware.security.secureclock-unstable-ndk_platform",
102 "android.hardware.security.sharedsecret-unstable-ndk_platform",
Joel Galensonde386b42020-09-30 10:53:05 -0700103 "android.security.compat-ndk_platform",
104 "android.system.keystore2-ndk_platform",
105 "libbase",
106 "libbinder_ndk",
107 "libcrypto",
108 "libhidlbase",
109 "libkeymaster4_1support",
Janis Danisevskisb60c0042020-12-17 00:11:21 -0800110 "libkeymint_support",
Joel Galensonde386b42020-09-30 10:53:05 -0700111 "libkeystore2_crypto",
112 "libkm_compat",
113 "libutils",
114 ],
Joel Galensonde386b42020-09-30 10:53:05 -0700115}