blob: f7a540aff467d16e8de41d47533a45e329d9067f [file] [log] [blame]
Bob Badour4c7858c2021-02-12 15:40:29 -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 "system_security_license"
5 // to get the below license kinds:
6 // SPDX-license-identifier-Apache-2.0
7 default_applicable_licenses: ["system_security_license"],
8}
9
David Zeuthenab3e5652019-10-28 13:32:48 -040010cc_defaults {
11 name: "identity_defaults",
12 cflags: [
13 "-Wall",
14 // "-Werror",
15 "-Wextra",
16 "-Wunused",
David Zeuthen472e6c82020-10-16 11:50:13 -040017 "-Wno-deprecated-declarations",
David Zeuthenab3e5652019-10-28 13:32:48 -040018 ],
19 sanitize: {
20 misc_undefined : ["integer"],
21 },
Alixcb159ff2022-04-18 03:59:35 +000022
David Zeuthenab3e5652019-10-28 13:32:48 -040023}
24
Pawan Waghc14ae0d2023-06-08 21:16:11 +000025cc_defaults {
26 name: "credstore_defaults",
David Drysdalebdb232d2021-11-22 14:41:18 +000027 defaults: [
28 "identity_defaults",
Tri Voc5ad1952022-09-06 17:16:42 -070029 "identity_use_latest_hal_aidl_cpp_static",
David Drysdalebdb232d2021-11-22 14:41:18 +000030 "keymint_use_latest_hal_aidl_ndk_shared",
Seth Moore07152b92022-01-25 23:04:37 +000031 "keymint_use_latest_hal_aidl_cpp_static",
Devin Mooree1a6f712023-05-23 23:19:49 +000032 "android.hardware.identity-support-lib-deps",
David Drysdalebdb232d2021-11-22 14:41:18 +000033 ],
David Zeuthenab3e5652019-10-28 13:32:48 -040034 srcs: [
David Zeuthenab3e5652019-10-28 13:32:48 -040035 "Credential.cpp",
36 "CredentialData.cpp",
Tri Vo3ab6f052022-11-22 10:26:16 -080037 "CredentialStore.cpp",
38 "CredentialStoreFactory.cpp",
David Zeuthen045a2c82021-09-11 13:52:17 -040039 "Session.cpp",
David Zeuthenab3e5652019-10-28 13:32:48 -040040 "Util.cpp",
Tri Vo3ab6f052022-11-22 10:26:16 -080041 "WritableCredential.cpp",
David Zeuthenab3e5652019-10-28 13:32:48 -040042 ],
David Zeuthenab3e5652019-10-28 13:32:48 -040043 shared_libs: [
Tri Vo3ab6f052022-11-22 10:26:16 -080044 "android.hardware.keymaster@4.0",
45 "android.security.authorization-ndk",
David Zeuthenab3e5652019-10-28 13:32:48 -040046 "libbase",
47 "libbinder",
Hasini Gunasinghe1b531b92021-03-02 00:34:58 +000048 "libbinder_ndk",
Max Bires5bb33f42021-03-11 00:44:06 -080049 "libcrypto",
David Zeuthenab3e5652019-10-28 13:32:48 -040050 "libhidlbase",
Devin Mooree1a6f712023-05-23 23:19:49 +000051 "liblog",
Tri Vo3ab6f052022-11-22 10:26:16 -080052 "libutils",
David Zeuthen045a2c82021-09-11 13:52:17 -040053 "libutilscallstack",
Rajesh Nyamagoud3f6c15c2023-03-11 01:26:48 +000054 "libkeystore-attestation-application-id",
David Zeuthenab3e5652019-10-28 13:32:48 -040055 ],
56 static_libs: [
Jiyong Park2c2466d2022-03-22 14:52:06 +090057 "android.hardware.keymaster-V3-cpp",
Devin Mooree1a6f712023-05-23 23:19:49 +000058 "android.hardware.identity-support-lib",
59 "android.hardware.security.rkp-V3-cpp",
Tri Vo3ab6f052022-11-22 10:26:16 -080060 "android.security.rkp_aidl-cpp",
Max Bires5bb33f42021-03-11 00:44:06 -080061 "libcppbor_external",
Devin Mooree1a6f712023-05-23 23:19:49 +000062 "libcredstore_aidl",
63 "libkeymaster4support",
Devin Mooree1a6f712023-05-23 23:19:49 +000064 "librkp_support",
David Drysdalebdb232d2021-11-22 14:41:18 +000065 ],
David Zeuthenab3e5652019-10-28 13:32:48 -040066}
67
Pawan Waghc14ae0d2023-06-08 21:16:11 +000068cc_binary {
69 name: "credstore",
70 defaults: [
71 "credstore_defaults",
72 ],
73 srcs: [
74 "main.cpp",
75 ],
76 init_rc: ["credstore.rc"],
77}
78
David Zeuthenab3e5652019-10-28 13:32:48 -040079filegroup {
80 name: "credstore_aidl",
81 srcs: [
82 "binder/android/security/identity/ICredential.aidl",
83 "binder/android/security/identity/IWritableCredential.aidl",
84 "binder/android/security/identity/ICredentialStore.aidl",
85 "binder/android/security/identity/AccessControlProfileParcel.aidl",
86 "binder/android/security/identity/EntryNamespaceParcel.aidl",
87 "binder/android/security/identity/EntryParcel.aidl",
88 "binder/android/security/identity/RequestNamespaceParcel.aidl",
89 "binder/android/security/identity/RequestEntryParcel.aidl",
90 "binder/android/security/identity/ResultNamespaceParcel.aidl",
91 "binder/android/security/identity/ResultEntryParcel.aidl",
92 "binder/android/security/identity/GetEntriesResultParcel.aidl",
93 "binder/android/security/identity/AuthKeyParcel.aidl",
94 "binder/android/security/identity/SecurityHardwareInfoParcel.aidl",
95 "binder/android/security/identity/ICredentialStoreFactory.aidl",
David Zeuthen045a2c82021-09-11 13:52:17 -040096 "binder/android/security/identity/ISession.aidl",
David Zeuthenab3e5652019-10-28 13:32:48 -040097 ],
98 path: "binder",
99}
100
Devin Mooree1a6f712023-05-23 23:19:49 +0000101cc_library_static {
David Zeuthenab3e5652019-10-28 13:32:48 -0400102 name: "libcredstore_aidl",
103 srcs: [
104 ":credstore_aidl",
105 ],
106 aidl: {
107 export_aidl_headers: true,
108 include_dirs: [
109 "system/security/identity/binder",
110 ],
111 },
112 shared_libs: [
113 "libbinder",
114 "libutils",
Devin Mooree1a6f712023-05-23 23:19:49 +0000115 ],
116 static_libs: [
David Zeuthenab3e5652019-10-28 13:32:48 -0400117 "libkeymaster4support",
118 ],
119 export_shared_lib_headers: [
120 "libbinder",
121 ],
122}
Pawan Waghc14ae0d2023-06-08 21:16:11 +0000123
124cc_fuzz {
125 name: "credstore_service_fuzzer",
126 defaults: [
127 "credstore_defaults",
128 "service_fuzzer_defaults",
129 "fuzzer_disable_leaks",
130 ],
131 srcs: [
132 "fuzzers/credstore_service_fuzzer.cpp",
133 ],
134 fuzz_config: {
135 triage_assignee: "waghpawan@google.com",
136 cc: [
137 "trong@google.com",
138 "zeuthen@google.com",
139 ]
140 },
141}