blob: 7e91c723a9b6038dee76b104bf42f554a9041d66 [file] [log] [blame]
Jeff Sharkeyc493cf92017-10-23 10:39:50 -06001cc_defaults {
2 name: "keystore_defaults",
3
4 cflags: [
5 "-Wall",
6 "-Werror",
7 "-Wextra",
8 "-Wunused",
9 ],
10
11 sanitize: {
12 misc_undefined: ["integer"],
13 },
14
15 clang: true,
16}
17
18cc_binary {
19 name: "keystore",
20 defaults: ["keystore_defaults"],
21
22 srcs: [
23 ":IKeyAttestationApplicationIdProvider.aidl",
24 "auth_token_table.cpp",
25 "blob.cpp",
26 "entropy.cpp",
27 "grant_store.cpp",
28 "key_store_service.cpp",
29 "keyblob_utils.cpp",
30 "keymaster_enforcement.cpp",
31 "keystore.cpp",
32 "keystore_attestation_id.cpp",
33 "keystore_main.cpp",
34 "keystore_utils.cpp",
35 "legacy_keymaster_device_wrapper.cpp",
36 "operation.cpp",
37 "permissions.cpp",
38 "user_state.cpp",
39 ],
40 shared_libs: [
41 "android.hardware.keymaster@3.0",
42 "android.system.wifi.keystore@1.0",
43 "libbinder",
44 "libcrypto",
45 "libcutils",
46 "libhardware",
47 "libhidlbase",
48 "libhidltransport",
49 "libhwbinder",
50 "libkeymaster_messages",
51 "libkeymaster_portable",
52 "libkeymaster_staging",
53 "libkeystore_binder",
54 "liblog",
55 "libselinux",
56 "libsoftkeymaster",
57 "libsoftkeymasterdevice",
58 "libutils",
59 "libwifikeystorehal",
60 ],
61 init_rc: ["keystore.rc"],
62 aidl: {
63 include_dirs: ["frameworks/base/core/java/"],
64 },
65
66 product_variables: {
67 pdk: {
68 enabled: false,
69 },
70 },
71}
72
73cc_binary {
74 name: "keystore_cli",
75 defaults: ["keystore_defaults"],
76 tags: ["debug"],
77
78 srcs: ["keystore_cli.cpp"],
79 shared_libs: [
80 "android.hardware.keymaster@3.0",
81 "libbinder",
82 "libcrypto",
83 "libcutils",
84 "libhidlbase",
85 "libhwbinder",
86 "libkeystore_binder",
87 "liblog",
88 "libutils",
89 ],
90}
91
92cc_binary {
93 name: "keystore_cli_v2",
94 defaults: ["keystore_defaults"],
95 tags: ["debug"],
96
97 cflags: [
98 "-DKEYMASTER_NAME_TAGS",
99 "-Wno-unused-parameter",
100 ],
101 srcs: ["keystore_cli_v2.cpp"],
102 shared_libs: [
103 "android.hardware.keymaster@3.0",
104 "libchrome",
105 "libhidlbase",
106 "libhwbinder",
107 "libkeystore_binder",
108 ],
109
110 local_include_dirs: ["include"],
111}
112
113// Library for keystore clients
114cc_library_shared {
115 name: "libkeystore_binder",
116 defaults: ["keystore_defaults"],
117
118 srcs: [
119 "IKeystoreService.cpp",
120 "KeyAttestationApplicationId.cpp",
121 "KeyAttestationPackageInfo.cpp",
122 "Signature.cpp",
123 "authorization_set.cpp",
124 "keyblob_utils.cpp",
125 "keystore_aidl_hidl_marshalling_utils.cpp",
126 "keystore_client.proto",
127 "keystore_client_impl.cpp",
128 "keystore_get.cpp",
129 "keystore_tags_utils.cpp",
130 ],
131 shared_libs: [
132 "android.hardware.keymaster@3.0",
133 "libbinder",
134 "libhidlbase",
135 "libhwbinder",
136 "liblog",
137 "libprotobuf-cpp-lite",
138 "libutils",
139 ],
140
141 proto: {
142 type: "lite",
143 export_proto_headers: true,
144 },
145 export_include_dirs: ["include"],
146 export_shared_lib_headers: [
147 "android.hardware.keymaster@3.0",
148 "libbinder",
149 "libhidlbase",
150 "libhwbinder",
151 ],
152}
153
154// Library for keystore clients using the WiFi HIDL interface
155cc_library_shared {
156 name: "libkeystore-wifi-hidl",
157 defaults: ["keystore_defaults"],
158
159 srcs: ["keystore_get_wifi_hidl.cpp"],
160 shared_libs: [
161 "android.system.wifi.keystore@1.0",
162 "libbase",
163 "libhidlbase",
164 "libhidltransport",
165 "liblog",
166 "libutils",
167 ],
168
169 export_include_dirs: ["include"],
170
171 vendor: true,
172}
173
174// Library for unit tests
175cc_library_static {
176 name: "libkeystore_test",
177 defaults: ["keystore_defaults"],
178
179 srcs: ["auth_token_table.cpp"],
180 static_libs: ["libgtest_main"],
181 shared_libs: [
182 "android.hardware.keymaster@3.0",
183 "libhidlbase",
184 "libhwbinder",
185 "libkeymaster_messages",
186 "libutils",
187 ],
188 export_shared_lib_headers: [
189 "android.hardware.keymaster@3.0",
190 "libhidlbase",
191 "libhwbinder",
192 ],
193
194 export_include_dirs: ["include"],
195}
196
197subdirs = ["tests"]