blob: a5635321e98c0c3b158518998db09de0387f4ae2 [file] [log] [blame]
Bob Badour4c7858c2021-02-12 15:40:29 -08001package {
Aditya Choudharyd987e9b2024-02-02 14:02:09 +00002 default_team: "trendy_team_android_hardware_backed_security",
Bob Badour4c7858c2021-02-12 15:40:29 -08003 // 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
David Zeuthenab3e5652019-10-28 13:32:48 -040011cc_defaults {
12 name: "identity_defaults",
13 cflags: [
14 "-Wall",
15 // "-Werror",
16 "-Wextra",
17 "-Wunused",
David Zeuthen472e6c82020-10-16 11:50:13 -040018 "-Wno-deprecated-declarations",
David Zeuthenab3e5652019-10-28 13:32:48 -040019 ],
20 sanitize: {
Aditya Choudharyd987e9b2024-02-02 14:02:09 +000021 misc_undefined: ["integer"],
David Zeuthenab3e5652019-10-28 13:32:48 -040022 },
Alixcb159ff2022-04-18 03:59:35 +000023
David Zeuthenab3e5652019-10-28 13:32:48 -040024}
25
Pawan Waghc14ae0d2023-06-08 21:16:11 +000026cc_defaults {
27 name: "credstore_defaults",
David Drysdalebdb232d2021-11-22 14:41:18 +000028 defaults: [
29 "identity_defaults",
Tri Voc5ad1952022-09-06 17:16:42 -070030 "identity_use_latest_hal_aidl_cpp_static",
David Drysdalebdb232d2021-11-22 14:41:18 +000031 "keymint_use_latest_hal_aidl_ndk_shared",
Seth Moore07152b92022-01-25 23:04:37 +000032 "keymint_use_latest_hal_aidl_cpp_static",
Devin Mooree1a6f712023-05-23 23:19:49 +000033 "android.hardware.identity-support-lib-deps",
David Drysdalebdb232d2021-11-22 14:41:18 +000034 ],
David Zeuthenab3e5652019-10-28 13:32:48 -040035 srcs: [
David Zeuthenab3e5652019-10-28 13:32:48 -040036 "Credential.cpp",
37 "CredentialData.cpp",
Tri Vo3ab6f052022-11-22 10:26:16 -080038 "CredentialStore.cpp",
39 "CredentialStoreFactory.cpp",
David Zeuthen045a2c82021-09-11 13:52:17 -040040 "Session.cpp",
David Zeuthenab3e5652019-10-28 13:32:48 -040041 "Util.cpp",
Tri Vo3ab6f052022-11-22 10:26:16 -080042 "WritableCredential.cpp",
David Zeuthenab3e5652019-10-28 13:32:48 -040043 ],
David Zeuthenab3e5652019-10-28 13:32:48 -040044 shared_libs: [
Tri Vo3ab6f052022-11-22 10:26:16 -080045 "android.hardware.keymaster@4.0",
46 "android.security.authorization-ndk",
David Zeuthenab3e5652019-10-28 13:32:48 -040047 "libbase",
48 "libbinder",
Hasini Gunasinghe1b531b92021-03-02 00:34:58 +000049 "libbinder_ndk",
Max Bires5bb33f42021-03-11 00:44:06 -080050 "libcrypto",
David Zeuthenab3e5652019-10-28 13:32:48 -040051 "libhidlbase",
Devin Mooree1a6f712023-05-23 23:19:49 +000052 "liblog",
Tri Vo3ab6f052022-11-22 10:26:16 -080053 "libutils",
David Zeuthen045a2c82021-09-11 13:52:17 -040054 "libutilscallstack",
Rajesh Nyamagoud3f6c15c2023-03-11 01:26:48 +000055 "libkeystore-attestation-application-id",
David Zeuthenab3e5652019-10-28 13:32:48 -040056 ],
57 static_libs: [
Jiyong Park2c2466d2022-03-22 14:52:06 +090058 "android.hardware.keymaster-V3-cpp",
Devin Mooree1a6f712023-05-23 23:19:49 +000059 "android.hardware.identity-support-lib",
60 "android.hardware.security.rkp-V3-cpp",
Tri Vo3ab6f052022-11-22 10:26:16 -080061 "android.security.rkp_aidl-cpp",
Shawn Willden387187d2024-03-28 20:42:37 -060062 "libcppbor",
Devin Mooree1a6f712023-05-23 23:19:49 +000063 "libcredstore_aidl",
64 "libkeymaster4support",
Devin Mooree1a6f712023-05-23 23:19:49 +000065 "librkp_support",
David Drysdalebdb232d2021-11-22 14:41:18 +000066 ],
David Zeuthenab3e5652019-10-28 13:32:48 -040067}
68
Pawan Waghc14ae0d2023-06-08 21:16:11 +000069cc_binary {
70 name: "credstore",
71 defaults: [
72 "credstore_defaults",
73 ],
74 srcs: [
75 "main.cpp",
76 ],
77 init_rc: ["credstore.rc"],
78}
79
David Zeuthenab3e5652019-10-28 13:32:48 -040080filegroup {
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",
David Zeuthen045a2c82021-09-11 13:52:17 -040097 "binder/android/security/identity/ISession.aidl",
David Zeuthenab3e5652019-10-28 13:32:48 -040098 ],
99 path: "binder",
100}
101
Devin Mooree1a6f712023-05-23 23:19:49 +0000102cc_library_static {
David Zeuthenab3e5652019-10-28 13:32:48 -0400103 name: "libcredstore_aidl",
104 srcs: [
105 ":credstore_aidl",
Aditya Choudharyd987e9b2024-02-02 14:02:09 +0000106 ],
David Zeuthenab3e5652019-10-28 13:32:48 -0400107 aidl: {
108 export_aidl_headers: true,
109 include_dirs: [
110 "system/security/identity/binder",
111 ],
112 },
113 shared_libs: [
114 "libbinder",
115 "libutils",
Devin Mooree1a6f712023-05-23 23:19:49 +0000116 ],
117 static_libs: [
David Zeuthenab3e5652019-10-28 13:32:48 -0400118 "libkeymaster4support",
119 ],
120 export_shared_lib_headers: [
121 "libbinder",
122 ],
123}
Pawan Waghc14ae0d2023-06-08 21:16:11 +0000124
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: "waghpawan@google.com",
137 cc: [
138 "trong@google.com",
139 "zeuthen@google.com",
Aditya Choudharyd987e9b2024-02-02 14:02:09 +0000140 ],
Pawan Waghc14ae0d2023-06-08 21:16:11 +0000141 },
142}