blob: fa214a7ee92299b50fa72d2e5eb8c9972a6e8e92 [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",
Janis Danisevskisb60c0042020-12-17 00:11:21 -080070 "libkeymint_support",
Joel Galensonde386b42020-09-30 10:53:05 -070071 "libkeystore2_crypto",
72 "libutils",
73 ],
74}
75
76cc_library {
77 name: "libkm_compat_service",
78 srcs: ["km_compat_service.cpp"],
79 shared_libs: [
Jeongik Cha98a5d092021-01-26 22:35:13 +090080 "android.hardware.security.keymint-V1-ndk_platform",
81 "android.hardware.security.secureclock-V1-ndk_platform",
82 "android.hardware.security.sharedsecret-V1-ndk_platform",
Joel Galensonde386b42020-09-30 10:53:05 -070083 "android.security.compat-ndk_platform",
84 "libbinder_ndk",
85 "libcrypto",
86 "libkm_compat",
87 "libkeymaster4_1support",
88 "libkeystore2_crypto",
89 ],
90}
91
92cc_test {
Janis Danisevskisb60c0042020-12-17 00:11:21 -080093 name: "keystore2_km_compat_test_cpp",
Joel Galensonde386b42020-09-30 10:53:05 -070094 cflags: [
95 "-Wall",
96 "-Werror",
97 "-Wextra",
98 ],
99 srcs: [
100 "certificate_test.cpp",
101 "gtest_main.cpp",
Janis Danisevskisb60c0042020-12-17 00:11:21 -0800102 "parameter_conversion_test.cpp",
Joel Galensonde386b42020-09-30 10:53:05 -0700103 "slot_test.cpp",
104 ],
105 shared_libs: [
106 "android.hardware.keymaster@3.0",
107 "android.hardware.keymaster@4.0",
108 "android.hardware.keymaster@4.1",
Jeongik Cha98a5d092021-01-26 22:35:13 +0900109 "android.hardware.security.keymint-V1-ndk_platform",
110 "android.hardware.security.secureclock-V1-ndk_platform",
111 "android.hardware.security.sharedsecret-V1-ndk_platform",
Joel Galensonde386b42020-09-30 10:53:05 -0700112 "android.security.compat-ndk_platform",
Jeongik Cha98a5d092021-01-26 22:35:13 +0900113 "android.system.keystore2-V1-ndk_platform",
Joel Galensonde386b42020-09-30 10:53:05 -0700114 "libbase",
115 "libbinder_ndk",
116 "libcrypto",
117 "libhidlbase",
118 "libkeymaster4_1support",
Janis Danisevskisb60c0042020-12-17 00:11:21 -0800119 "libkeymint_support",
Joel Galensonde386b42020-09-30 10:53:05 -0700120 "libkeystore2_crypto",
121 "libkm_compat",
122 "libutils",
123 ],
Joel Galensonde386b42020-09-30 10:53:05 -0700124}