1package {
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
10cc_library_static {
11    name: "android.hardware.identity-libeic-hal-common",
12    vendor_available: true,
13    srcs: [
14        "common/IdentityCredential.cpp",
15        "common/IdentityCredentialStore.cpp",
16        "common/WritableIdentityCredential.cpp",
17    ],
18    export_include_dirs: [
19        "common",
20    ],
21    cflags: [
22        "-Wall",
23        "-Wextra",
24        "-Wno-deprecated-declarations",
25    ],
26    shared_libs: [
27        "liblog",
28        "libcrypto",
29        "libbinder_ndk",
30        "libkeymaster_messages",
31    ],
32    static_libs: [
33        "libbase",
34        "libcppbor_external",
35        "libcppcose_rkp",
36        "libutils",
37        "libsoft_attestation_cert",
38        "libkeymaster_portable",
39        "libsoft_attestation_cert",
40        "libpuresoftkeymasterdevice",
41        "android.hardware.identity-support-lib",
42        "android.hardware.identity-V3-ndk_platform",
43        "android.hardware.keymaster-V3-ndk_platform",
44    ],
45}
46
47cc_library_static {
48    name: "android.hardware.identity-libeic-library",
49    vendor_available: true,
50    srcs: [
51        "libeic/EicCbor.c",
52        "libeic/EicPresentation.c",
53        "libeic/EicProvisioning.c",
54        "EicOpsImpl.cc",
55    ],
56    export_include_dirs: [
57        "libeic",
58    ],
59    cflags: [
60        "-DEIC_COMPILATION",
61        "-Wall",
62        "-Wextra",
63        "-DEIC_DEBUG",
64        // Allow using C2x extensions such as omitting parameter names
65        "-Wno-c2x-extensions",
66    ],
67    shared_libs: [
68        "libbase",
69        "libcrypto",
70    ],
71    static_libs: [
72        "android.hardware.identity-support-lib",
73    ],
74}
75
76cc_binary {
77    name: "android.hardware.identity-service.example",
78    relative_install_path: "hw",
79    init_rc: ["identity-default.rc"],
80    vintf_fragments: ["identity-default.xml"],
81    vendor: true,
82    cflags: [
83        "-Wall",
84        "-Wextra",
85        "-g",
86    ],
87    shared_libs: [
88        "liblog",
89        "libcrypto",
90        "libbinder_ndk",
91        "libkeymaster_messages",
92    ],
93    static_libs: [
94        "libbase",
95        "libcppbor_external",
96        "libcppcose_rkp",
97        "libutils",
98        "libsoft_attestation_cert",
99        "libkeymaster_portable",
100        "libsoft_attestation_cert",
101        "libpuresoftkeymasterdevice",
102        "android.hardware.identity-support-lib",
103        "android.hardware.identity-V3-ndk_platform",
104        "android.hardware.keymaster-V3-ndk_platform",
105        "android.hardware.identity-libeic-hal-common",
106        "android.hardware.identity-libeic-library",
107    ],
108    srcs: [
109        "service.cpp",
110        "FakeSecureHardwareProxy.cpp",
111    ],
112    required: [
113        "android.hardware.identity_credential.xml",
114    ],
115}
116
117cc_test {
118    name: "libeic_test",
119    srcs: [
120        "EicTests.cpp",
121        "FakeSecureHardwareProxy.cpp",
122    ],
123    cflags: [
124        "-Wall",
125        "-Wextra",
126        "-g",
127        "-DEIC_DEBUG",
128    ],
129    local_include_dirs: [
130         "common",
131    ],
132    shared_libs: [
133        "liblog",
134        "libcrypto",
135        "libkeymaster_messages",
136    ],
137    static_libs: [
138        "libbase",
139        "libcppbor_external",
140        "libcppcose_rkp",
141        "libutils",
142        "libsoft_attestation_cert",
143        "libkeymaster_portable",
144        "libsoft_attestation_cert",
145        "libpuresoftkeymasterdevice",
146        "android.hardware.identity-support-lib",
147        "android.hardware.identity-libeic-library",
148    ],
149    test_suites: [
150        "general-tests",
151    ],
152}
153
154prebuilt_etc {
155    name: "android.hardware.identity_credential.xml",
156    sub_dir: "permissions",
157    vendor: true,
158    src: "android.hardware.identity_credential.xml",
159}
160