blob: 4127aa046deea36813308ce655f56d3f58898a2c [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"],
28
29 rustlibs: [
Jeongik Cha9f632c62021-01-23 09:33:35 +090030 "android.hardware.security.keymint-V1-rust",
Joel Galensonde386b42020-09-30 10:53:05 -070031 "android.security.compat-rust",
32 ],
33 shared_libs: [
34 "libkm_compat_service",
35 ]
36}
37
38rust_test {
39 name: "keystore2_km_compat_test",
40 crate_name: "keystore2",
41 srcs: ["lib.rs"],
42 test_suites: ["general-tests"],
43 auto_gen_config: true,
44 rustlibs: [
Jeongik Cha9f632c62021-01-23 09:33:35 +090045 "android.hardware.security.keymint-V1-rust",
Joel Galensonde386b42020-09-30 10:53:05 -070046 "android.security.compat-rust",
47 ],
48 shared_libs: [
49 "libkm_compat_service",
50 ],
51}
52
53cc_library {
54 name: "libkm_compat",
55 srcs: ["km_compat.cpp"],
56 shared_libs: [
57 "android.hardware.keymaster@3.0",
58 "android.hardware.keymaster@4.0",
59 "android.hardware.keymaster@4.1",
Jeongik Cha98a5d092021-01-26 22:35:13 +090060 "android.hardware.security.keymint-V1-ndk_platform",
61 "android.hardware.security.secureclock-V1-ndk_platform",
62 "android.hardware.security.sharedsecret-V1-ndk_platform",
Joel Galensonde386b42020-09-30 10:53:05 -070063 "android.security.compat-ndk_platform",
Jeongik Cha98a5d092021-01-26 22:35:13 +090064 "android.system.keystore2-V1-ndk_platform",
Joel Galensonde386b42020-09-30 10:53:05 -070065 "libbase",
66 "libbinder_ndk",
67 "libcrypto",
68 "libhidlbase",
69 "libkeymaster4_1support",
David Zeuthen90b6ae32021-02-23 10:41:52 -050070 "libkeymint",
Janis Danisevskisb60c0042020-12-17 00:11:21 -080071 "libkeymint_support",
Joel Galensonde386b42020-09-30 10:53:05 -070072 "libkeystore2_crypto",
73 "libutils",
74 ],
75}
76
77cc_library {
78 name: "libkm_compat_service",
79 srcs: ["km_compat_service.cpp"],
80 shared_libs: [
Jeongik Cha98a5d092021-01-26 22:35:13 +090081 "android.hardware.security.keymint-V1-ndk_platform",
82 "android.hardware.security.secureclock-V1-ndk_platform",
83 "android.hardware.security.sharedsecret-V1-ndk_platform",
Joel Galensonde386b42020-09-30 10:53:05 -070084 "android.security.compat-ndk_platform",
85 "libbinder_ndk",
86 "libcrypto",
87 "libkm_compat",
88 "libkeymaster4_1support",
89 "libkeystore2_crypto",
90 ],
91}
92
93cc_test {
Janis Danisevskisb60c0042020-12-17 00:11:21 -080094 name: "keystore2_km_compat_test_cpp",
Joel Galensonde386b42020-09-30 10:53:05 -070095 cflags: [
96 "-Wall",
97 "-Werror",
98 "-Wextra",
99 ],
100 srcs: [
101 "certificate_test.cpp",
102 "gtest_main.cpp",
Janis Danisevskisb60c0042020-12-17 00:11:21 -0800103 "parameter_conversion_test.cpp",
Joel Galensonde386b42020-09-30 10:53:05 -0700104 "slot_test.cpp",
105 ],
106 shared_libs: [
107 "android.hardware.keymaster@3.0",
108 "android.hardware.keymaster@4.0",
109 "android.hardware.keymaster@4.1",
Jeongik Cha98a5d092021-01-26 22:35:13 +0900110 "android.hardware.security.keymint-V1-ndk_platform",
111 "android.hardware.security.secureclock-V1-ndk_platform",
112 "android.hardware.security.sharedsecret-V1-ndk_platform",
Joel Galensonde386b42020-09-30 10:53:05 -0700113 "android.security.compat-ndk_platform",
Jeongik Cha98a5d092021-01-26 22:35:13 +0900114 "android.system.keystore2-V1-ndk_platform",
Joel Galensonde386b42020-09-30 10:53:05 -0700115 "libbase",
116 "libbinder_ndk",
117 "libcrypto",
118 "libhidlbase",
119 "libkeymaster4_1support",
Janis Danisevskisb60c0042020-12-17 00:11:21 -0800120 "libkeymint_support",
Joel Galensonde386b42020-09-30 10:53:05 -0700121 "libkeystore2_crypto",
122 "libkm_compat",
123 "libutils",
124 ],
Joel Galensonde386b42020-09-30 10:53:05 -0700125}