blob: 7ca6a63af4ff38d0560e8385e58165e0b4d8d82d [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: [
21 "android.hardware.security.keymint-rust",
22 "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: [
36 "android.hardware.security.keymint-rust",
37 "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",
52 "android.security.compat-ndk_platform",
53 "android.system.keystore2-ndk_platform",
54 "libbase",
55 "libbinder_ndk",
56 "libcrypto",
57 "libhidlbase",
58 "libkeymaster4_1support",
Janis Danisevskisb60c0042020-12-17 00:11:21 -080059 "libkeymint_support",
Joel Galensonde386b42020-09-30 10:53:05 -070060 "libkeystore2_crypto",
61 "libutils",
62 ],
63}
64
65cc_library {
66 name: "libkm_compat_service",
67 srcs: ["km_compat_service.cpp"],
68 shared_libs: [
69 "android.security.compat-ndk_platform",
70 "libbinder_ndk",
71 "libcrypto",
72 "libkm_compat",
73 "libkeymaster4_1support",
74 "libkeystore2_crypto",
75 ],
76}
77
78cc_test {
Janis Danisevskisb60c0042020-12-17 00:11:21 -080079 name: "keystore2_km_compat_test_cpp",
Joel Galensonde386b42020-09-30 10:53:05 -070080 cflags: [
81 "-Wall",
82 "-Werror",
83 "-Wextra",
84 ],
85 srcs: [
86 "certificate_test.cpp",
87 "gtest_main.cpp",
Janis Danisevskisb60c0042020-12-17 00:11:21 -080088 "parameter_conversion_test.cpp",
Joel Galensonde386b42020-09-30 10:53:05 -070089 "slot_test.cpp",
90 ],
91 shared_libs: [
92 "android.hardware.keymaster@3.0",
93 "android.hardware.keymaster@4.0",
94 "android.hardware.keymaster@4.1",
95 "android.hardware.security.keymint-unstable-ndk_platform",
96 "android.security.compat-ndk_platform",
97 "android.system.keystore2-ndk_platform",
98 "libbase",
99 "libbinder_ndk",
100 "libcrypto",
101 "libhidlbase",
102 "libkeymaster4_1support",
Janis Danisevskisb60c0042020-12-17 00:11:21 -0800103 "libkeymint_support",
Joel Galensonde386b42020-09-30 10:53:05 -0700104 "libkeystore2_crypto",
105 "libkm_compat",
106 "libutils",
107 ],
Joel Galensonde386b42020-09-30 10:53:05 -0700108}