xref: /aosp_15_r20/system/security/identity/Android.bp (revision e1997b9af69e3155ead6e072d106a0077849ffba)
1package {
2    default_team: "trendy_team_android_hardware_backed_security",
3    // See: http://go/android-license-faq
4    // A large-scale-change added 'default_applicable_licenses' to import
5    // all of the 'license_kinds' from "system_security_license"
6    // to get the below license kinds:
7    //   SPDX-license-identifier-Apache-2.0
8    default_applicable_licenses: ["system_security_license"],
9}
10
11cc_defaults {
12    name: "identity_defaults",
13    cflags: [
14        "-Wall",
15        // "-Werror",
16        "-Wextra",
17        "-Wunused",
18        "-Wno-deprecated-declarations",
19    ],
20    sanitize: {
21        misc_undefined: ["integer"],
22    },
23
24}
25
26cc_defaults {
27    name: "credstore_defaults",
28    defaults: [
29        "identity_defaults",
30        "identity_use_latest_hal_aidl_cpp_static",
31        "keymint_use_latest_hal_aidl_ndk_shared",
32        "keymint_use_latest_hal_aidl_cpp_static",
33        "android.hardware.identity-support-lib-deps",
34    ],
35    srcs: [
36        "Credential.cpp",
37        "CredentialData.cpp",
38        "CredentialStore.cpp",
39        "CredentialStoreFactory.cpp",
40        "Session.cpp",
41        "Util.cpp",
42        "WritableCredential.cpp",
43    ],
44    shared_libs: [
45        "[email protected]",
46        "android.security.authorization-ndk",
47        "libbase",
48        "libbinder",
49        "libbinder_ndk",
50        "libcrypto",
51        "libhidlbase",
52        "liblog",
53        "libutils",
54        "libutilscallstack",
55        "libkeystore-attestation-application-id",
56    ],
57    static_libs: [
58        "android.hardware.keymaster-V3-cpp",
59        "android.hardware.identity-support-lib",
60        "android.hardware.security.rkp-V3-cpp",
61        "android.security.rkp_aidl-cpp",
62        "libcppbor",
63        "libcredstore_aidl",
64        "libkeymaster4support",
65        "librkp_support",
66    ],
67}
68
69cc_binary {
70    name: "credstore",
71    defaults: [
72        "credstore_defaults",
73    ],
74    srcs: [
75        "main.cpp",
76    ],
77    init_rc: ["credstore.rc"],
78}
79
80filegroup {
81    name: "credstore_aidl",
82    srcs: [
83        "binder/android/security/identity/ICredential.aidl",
84        "binder/android/security/identity/IWritableCredential.aidl",
85        "binder/android/security/identity/ICredentialStore.aidl",
86        "binder/android/security/identity/AccessControlProfileParcel.aidl",
87        "binder/android/security/identity/EntryNamespaceParcel.aidl",
88        "binder/android/security/identity/EntryParcel.aidl",
89        "binder/android/security/identity/RequestNamespaceParcel.aidl",
90        "binder/android/security/identity/RequestEntryParcel.aidl",
91        "binder/android/security/identity/ResultNamespaceParcel.aidl",
92        "binder/android/security/identity/ResultEntryParcel.aidl",
93        "binder/android/security/identity/GetEntriesResultParcel.aidl",
94        "binder/android/security/identity/AuthKeyParcel.aidl",
95        "binder/android/security/identity/SecurityHardwareInfoParcel.aidl",
96        "binder/android/security/identity/ICredentialStoreFactory.aidl",
97        "binder/android/security/identity/ISession.aidl",
98    ],
99    path: "binder",
100}
101
102cc_library_static {
103    name: "libcredstore_aidl",
104    srcs: [
105        ":credstore_aidl",
106    ],
107    aidl: {
108        export_aidl_headers: true,
109        include_dirs: [
110            "system/security/identity/binder",
111        ],
112    },
113    shared_libs: [
114        "libbinder",
115        "libutils",
116    ],
117    static_libs: [
118        "libkeymaster4support",
119    ],
120    export_shared_lib_headers: [
121        "libbinder",
122    ],
123}
124
125cc_fuzz {
126    name: "credstore_service_fuzzer",
127    defaults: [
128        "credstore_defaults",
129        "service_fuzzer_defaults",
130        "fuzzer_disable_leaks",
131    ],
132    srcs: [
133        "fuzzers/credstore_service_fuzzer.cpp",
134    ],
135    fuzz_config: {
136        triage_assignee: "[email protected]",
137        cc: [
138            "[email protected]",
139            "[email protected]",
140        ],
141    },
142}
143