blob: 7bc3c8de8e6df71ec6f73e9ed804d5bd31e9e89f [file] [log] [blame]
Bob Badourb224b362021-02-12 20:13:01 -08001package {
2 // See: http://go/android-license-faq
3 // A large-scale-change added 'default_applicable_licenses' to import
4 // all of the 'license_kinds' from "hardware_interfaces_license"
5 // to get the below license kinds:
6 // SPDX-license-identifier-Apache-2.0
7 default_applicable_licenses: ["hardware_interfaces_license"],
8}
9
David Zeuthen630de2a2020-05-11 14:04:54 -040010cc_library_static {
11 name: "android.hardware.identity-libeic-hal-common",
12 vendor_available: true,
Tri Vo680cb1d2022-09-06 17:20:37 -070013 defaults: [
14 "identity_use_latest_hal_aidl_ndk_static",
15 "keymint_use_latest_hal_aidl_ndk_static",
16 ],
David Zeuthen630de2a2020-05-11 14:04:54 -040017 srcs: [
18 "common/IdentityCredential.cpp",
19 "common/IdentityCredentialStore.cpp",
David Zeuthen1eb12b22021-09-11 13:59:43 -040020 "common/PresentationSession.cpp",
David Zeuthen630de2a2020-05-11 14:04:54 -040021 "common/WritableIdentityCredential.cpp",
22 ],
23 export_include_dirs: [
24 "common",
25 ],
26 cflags: [
27 "-Wall",
28 "-Wextra",
David Zeuthen49f2d252020-10-16 11:27:24 -040029 "-Wno-deprecated-declarations",
David Zeuthen630de2a2020-05-11 14:04:54 -040030 ],
31 shared_libs: [
32 "liblog",
33 "libcrypto",
34 "libbinder_ndk",
35 "libkeymaster_messages",
36 ],
37 static_libs: [
38 "libbase",
Max Biresa3c7f4c2021-04-09 08:56:40 -070039 "libcppbor_external",
Max Bires9704ff62021-04-07 11:12:01 -070040 "libcppcose_rkp",
David Zeuthen630de2a2020-05-11 14:04:54 -040041 "libutils",
42 "libsoft_attestation_cert",
43 "libkeymaster_portable",
44 "libsoft_attestation_cert",
45 "libpuresoftkeymasterdevice",
46 "android.hardware.identity-support-lib",
Jiyong Park3c4b1722022-03-22 14:46:00 +090047 "android.hardware.keymaster-V3-ndk",
Seth Moore41e97f02022-11-04 17:39:05 +000048 "android.hardware.security.rkp-V3-ndk",
David Zeuthen630de2a2020-05-11 14:04:54 -040049 ],
50}
51
52cc_library_static {
53 name: "android.hardware.identity-libeic-library",
54 vendor_available: true,
55 srcs: [
56 "libeic/EicCbor.c",
David Zeuthen1eb12b22021-09-11 13:59:43 -040057 "libeic/EicSession.c",
David Zeuthen630de2a2020-05-11 14:04:54 -040058 "libeic/EicPresentation.c",
59 "libeic/EicProvisioning.c",
60 "EicOpsImpl.cc",
61 ],
62 export_include_dirs: [
63 "libeic",
64 ],
65 cflags: [
66 "-DEIC_COMPILATION",
67 "-Wall",
68 "-Wextra",
69 "-DEIC_DEBUG",
70 // Allow using C2x extensions such as omitting parameter names
71 "-Wno-c2x-extensions",
72 ],
73 shared_libs: [
74 "libbase",
75 "libcrypto",
76 ],
77 static_libs: [
78 "android.hardware.identity-support-lib",
79 ],
80}
81
David Zeuthen81603152020-02-11 22:04:24 -050082cc_binary {
83 name: "android.hardware.identity-service.example",
84 relative_install_path: "hw",
85 init_rc: ["identity-default.rc"],
86 vintf_fragments: ["identity-default.xml"],
87 vendor: true,
Seth Moore1bf823c2022-01-25 23:04:37 +000088 defaults: [
Tri Vo680cb1d2022-09-06 17:20:37 -070089 "identity_use_latest_hal_aidl_ndk_static",
Seth Moore1bf823c2022-01-25 23:04:37 +000090 "keymint_use_latest_hal_aidl_ndk_static",
91 ],
David Zeuthen81603152020-02-11 22:04:24 -050092 cflags: [
93 "-Wall",
94 "-Wextra",
David Zeuthen630de2a2020-05-11 14:04:54 -040095 "-g",
David Zeuthen81603152020-02-11 22:04:24 -050096 ],
97 shared_libs: [
David Zeuthen81603152020-02-11 22:04:24 -050098 "liblog",
David Zeuthen630de2a2020-05-11 14:04:54 -040099 "libcrypto",
100 "libbinder_ndk",
101 "libkeymaster_messages",
102 ],
103 static_libs: [
104 "libbase",
Max Biresa3c7f4c2021-04-09 08:56:40 -0700105 "libcppbor_external",
Max Bires9704ff62021-04-07 11:12:01 -0700106 "libcppcose_rkp",
David Zeuthen81603152020-02-11 22:04:24 -0500107 "libutils",
David Zeuthen630de2a2020-05-11 14:04:54 -0400108 "libsoft_attestation_cert",
109 "libkeymaster_portable",
110 "libsoft_attestation_cert",
111 "libpuresoftkeymasterdevice",
David Zeuthen81603152020-02-11 22:04:24 -0500112 "android.hardware.identity-support-lib",
Jiyong Park3c4b1722022-03-22 14:46:00 +0900113 "android.hardware.keymaster-V3-ndk",
David Zeuthen630de2a2020-05-11 14:04:54 -0400114 "android.hardware.identity-libeic-hal-common",
115 "android.hardware.identity-libeic-library",
Seth Moore41e97f02022-11-04 17:39:05 +0000116 "android.hardware.security.rkp-V3-ndk",
David Zeuthen81603152020-02-11 22:04:24 -0500117 ],
118 srcs: [
David Zeuthen81603152020-02-11 22:04:24 -0500119 "service.cpp",
David Zeuthen630de2a2020-05-11 14:04:54 -0400120 "FakeSecureHardwareProxy.cpp",
David Zeuthen81603152020-02-11 22:04:24 -0500121 ],
David Zeuthen49f2d252020-10-16 11:27:24 -0400122 required: [
123 "android.hardware.identity_credential.xml",
124 ],
125}
126
David Zeuthenaf7e9cf2021-06-10 18:34:24 -0400127cc_test {
128 name: "libeic_test",
129 srcs: [
130 "EicTests.cpp",
131 "FakeSecureHardwareProxy.cpp",
132 ],
133 cflags: [
134 "-Wall",
135 "-Wextra",
136 "-g",
137 "-DEIC_DEBUG",
138 ],
139 local_include_dirs: [
Jiyong Park27f77fe2021-07-27 12:16:52 +0900140 "common",
David Zeuthenaf7e9cf2021-06-10 18:34:24 -0400141 ],
142 shared_libs: [
143 "liblog",
144 "libcrypto",
145 "libkeymaster_messages",
146 ],
147 static_libs: [
148 "libbase",
149 "libcppbor_external",
150 "libcppcose_rkp",
151 "libutils",
152 "libsoft_attestation_cert",
153 "libkeymaster_portable",
154 "libsoft_attestation_cert",
155 "libpuresoftkeymasterdevice",
156 "android.hardware.identity-support-lib",
157 "android.hardware.identity-libeic-library",
158 ],
159 test_suites: [
160 "general-tests",
161 ],
162}
163
David Zeuthen49f2d252020-10-16 11:27:24 -0400164prebuilt_etc {
165 name: "android.hardware.identity_credential.xml",
166 sub_dir: "permissions",
167 vendor: true,
168 src: "android.hardware.identity_credential.xml",
David Zeuthen81603152020-02-11 22:04:24 -0500169}