blob: a57875aee5de66ab3f9e31c87063d9dc3a53ab92 [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",
David Zeuthen630de2a2020-05-11 14:04:54 -040048 ],
49}
50
51cc_library_static {
52 name: "android.hardware.identity-libeic-library",
53 vendor_available: true,
54 srcs: [
55 "libeic/EicCbor.c",
David Zeuthen1eb12b22021-09-11 13:59:43 -040056 "libeic/EicSession.c",
David Zeuthen630de2a2020-05-11 14:04:54 -040057 "libeic/EicPresentation.c",
58 "libeic/EicProvisioning.c",
59 "EicOpsImpl.cc",
60 ],
61 export_include_dirs: [
62 "libeic",
63 ],
64 cflags: [
65 "-DEIC_COMPILATION",
66 "-Wall",
67 "-Wextra",
68 "-DEIC_DEBUG",
69 // Allow using C2x extensions such as omitting parameter names
70 "-Wno-c2x-extensions",
71 ],
72 shared_libs: [
73 "libbase",
74 "libcrypto",
75 ],
76 static_libs: [
77 "android.hardware.identity-support-lib",
78 ],
79}
80
David Zeuthen81603152020-02-11 22:04:24 -050081cc_binary {
82 name: "android.hardware.identity-service.example",
83 relative_install_path: "hw",
84 init_rc: ["identity-default.rc"],
85 vintf_fragments: ["identity-default.xml"],
86 vendor: true,
Seth Moore1bf823c2022-01-25 23:04:37 +000087 defaults: [
Tri Vo680cb1d2022-09-06 17:20:37 -070088 "identity_use_latest_hal_aidl_ndk_static",
Seth Moore1bf823c2022-01-25 23:04:37 +000089 "keymint_use_latest_hal_aidl_ndk_static",
90 ],
David Zeuthen81603152020-02-11 22:04:24 -050091 cflags: [
92 "-Wall",
93 "-Wextra",
David Zeuthen630de2a2020-05-11 14:04:54 -040094 "-g",
David Zeuthen81603152020-02-11 22:04:24 -050095 ],
96 shared_libs: [
David Zeuthen81603152020-02-11 22:04:24 -050097 "liblog",
David Zeuthen630de2a2020-05-11 14:04:54 -040098 "libcrypto",
99 "libbinder_ndk",
100 "libkeymaster_messages",
101 ],
102 static_libs: [
103 "libbase",
Max Biresa3c7f4c2021-04-09 08:56:40 -0700104 "libcppbor_external",
Max Bires9704ff62021-04-07 11:12:01 -0700105 "libcppcose_rkp",
David Zeuthen81603152020-02-11 22:04:24 -0500106 "libutils",
David Zeuthen630de2a2020-05-11 14:04:54 -0400107 "libsoft_attestation_cert",
108 "libkeymaster_portable",
109 "libsoft_attestation_cert",
110 "libpuresoftkeymasterdevice",
David Zeuthen81603152020-02-11 22:04:24 -0500111 "android.hardware.identity-support-lib",
Jiyong Park3c4b1722022-03-22 14:46:00 +0900112 "android.hardware.keymaster-V3-ndk",
David Zeuthen630de2a2020-05-11 14:04:54 -0400113 "android.hardware.identity-libeic-hal-common",
114 "android.hardware.identity-libeic-library",
David Zeuthen81603152020-02-11 22:04:24 -0500115 ],
116 srcs: [
David Zeuthen81603152020-02-11 22:04:24 -0500117 "service.cpp",
David Zeuthen630de2a2020-05-11 14:04:54 -0400118 "FakeSecureHardwareProxy.cpp",
David Zeuthen81603152020-02-11 22:04:24 -0500119 ],
David Zeuthen49f2d252020-10-16 11:27:24 -0400120 required: [
121 "android.hardware.identity_credential.xml",
122 ],
123}
124
David Zeuthenaf7e9cf2021-06-10 18:34:24 -0400125cc_test {
126 name: "libeic_test",
127 srcs: [
128 "EicTests.cpp",
129 "FakeSecureHardwareProxy.cpp",
130 ],
131 cflags: [
132 "-Wall",
133 "-Wextra",
134 "-g",
135 "-DEIC_DEBUG",
136 ],
137 local_include_dirs: [
Jiyong Park27f77fe2021-07-27 12:16:52 +0900138 "common",
David Zeuthenaf7e9cf2021-06-10 18:34:24 -0400139 ],
140 shared_libs: [
141 "liblog",
142 "libcrypto",
143 "libkeymaster_messages",
144 ],
145 static_libs: [
146 "libbase",
147 "libcppbor_external",
148 "libcppcose_rkp",
149 "libutils",
150 "libsoft_attestation_cert",
151 "libkeymaster_portable",
152 "libsoft_attestation_cert",
153 "libpuresoftkeymasterdevice",
154 "android.hardware.identity-support-lib",
155 "android.hardware.identity-libeic-library",
156 ],
157 test_suites: [
158 "general-tests",
159 ],
160}
161
David Zeuthen49f2d252020-10-16 11:27:24 -0400162prebuilt_etc {
163 name: "android.hardware.identity_credential.xml",
164 sub_dir: "permissions",
165 vendor: true,
166 src: "android.hardware.identity_credential.xml",
David Zeuthen81603152020-02-11 22:04:24 -0500167}