Bob Badour | 4c7858c | 2021-02-12 15:40:29 -0800 | [diff] [blame] | 1 | package { |
Aditya Choudhary | d987e9b | 2024-02-02 14:02:09 +0000 | [diff] [blame] | 2 | default_team: "trendy_team_android_hardware_backed_security", |
Bob Badour | 4c7858c | 2021-02-12 15:40:29 -0800 | [diff] [blame] | 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 | |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 11 | cc_defaults { |
| 12 | name: "identity_defaults", |
| 13 | cflags: [ |
| 14 | "-Wall", |
| 15 | // "-Werror", |
| 16 | "-Wextra", |
| 17 | "-Wunused", |
David Zeuthen | 472e6c8 | 2020-10-16 11:50:13 -0400 | [diff] [blame] | 18 | "-Wno-deprecated-declarations", |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 19 | ], |
| 20 | sanitize: { |
Aditya Choudhary | d987e9b | 2024-02-02 14:02:09 +0000 | [diff] [blame] | 21 | misc_undefined: ["integer"], |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 22 | }, |
Alix | cb159ff | 2022-04-18 03:59:35 +0000 | [diff] [blame] | 23 | |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 24 | } |
| 25 | |
Pawan Wagh | c14ae0d | 2023-06-08 21:16:11 +0000 | [diff] [blame] | 26 | cc_defaults { |
| 27 | name: "credstore_defaults", |
David Drysdale | bdb232d | 2021-11-22 14:41:18 +0000 | [diff] [blame] | 28 | defaults: [ |
| 29 | "identity_defaults", |
Tri Vo | c5ad195 | 2022-09-06 17:16:42 -0700 | [diff] [blame] | 30 | "identity_use_latest_hal_aidl_cpp_static", |
David Drysdale | bdb232d | 2021-11-22 14:41:18 +0000 | [diff] [blame] | 31 | "keymint_use_latest_hal_aidl_ndk_shared", |
Seth Moore | 07152b9 | 2022-01-25 23:04:37 +0000 | [diff] [blame] | 32 | "keymint_use_latest_hal_aidl_cpp_static", |
Devin Moore | e1a6f71 | 2023-05-23 23:19:49 +0000 | [diff] [blame] | 33 | "android.hardware.identity-support-lib-deps", |
David Drysdale | bdb232d | 2021-11-22 14:41:18 +0000 | [diff] [blame] | 34 | ], |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 35 | srcs: [ |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 36 | "Credential.cpp", |
| 37 | "CredentialData.cpp", |
Tri Vo | 3ab6f05 | 2022-11-22 10:26:16 -0800 | [diff] [blame] | 38 | "CredentialStore.cpp", |
| 39 | "CredentialStoreFactory.cpp", |
David Zeuthen | 045a2c8 | 2021-09-11 13:52:17 -0400 | [diff] [blame] | 40 | "Session.cpp", |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 41 | "Util.cpp", |
Tri Vo | 3ab6f05 | 2022-11-22 10:26:16 -0800 | [diff] [blame] | 42 | "WritableCredential.cpp", |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 43 | ], |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 44 | shared_libs: [ |
Tri Vo | 3ab6f05 | 2022-11-22 10:26:16 -0800 | [diff] [blame] | 45 | "android.hardware.keymaster@4.0", |
| 46 | "android.security.authorization-ndk", |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 47 | "libbase", |
| 48 | "libbinder", |
Hasini Gunasinghe | 1b531b9 | 2021-03-02 00:34:58 +0000 | [diff] [blame] | 49 | "libbinder_ndk", |
Max Bires | 5bb33f4 | 2021-03-11 00:44:06 -0800 | [diff] [blame] | 50 | "libcrypto", |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 51 | "libhidlbase", |
Devin Moore | e1a6f71 | 2023-05-23 23:19:49 +0000 | [diff] [blame] | 52 | "liblog", |
Tri Vo | 3ab6f05 | 2022-11-22 10:26:16 -0800 | [diff] [blame] | 53 | "libutils", |
David Zeuthen | 045a2c8 | 2021-09-11 13:52:17 -0400 | [diff] [blame] | 54 | "libutilscallstack", |
Rajesh Nyamagoud | 3f6c15c | 2023-03-11 01:26:48 +0000 | [diff] [blame] | 55 | "libkeystore-attestation-application-id", |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 56 | ], |
| 57 | static_libs: [ |
Jiyong Park | 2c2466d | 2022-03-22 14:52:06 +0900 | [diff] [blame] | 58 | "android.hardware.keymaster-V3-cpp", |
Devin Moore | e1a6f71 | 2023-05-23 23:19:49 +0000 | [diff] [blame] | 59 | "android.hardware.identity-support-lib", |
| 60 | "android.hardware.security.rkp-V3-cpp", |
Tri Vo | 3ab6f05 | 2022-11-22 10:26:16 -0800 | [diff] [blame] | 61 | "android.security.rkp_aidl-cpp", |
Shawn Willden | 387187d | 2024-03-28 20:42:37 -0600 | [diff] [blame^] | 62 | "libcppbor", |
Devin Moore | e1a6f71 | 2023-05-23 23:19:49 +0000 | [diff] [blame] | 63 | "libcredstore_aidl", |
| 64 | "libkeymaster4support", |
Devin Moore | e1a6f71 | 2023-05-23 23:19:49 +0000 | [diff] [blame] | 65 | "librkp_support", |
David Drysdale | bdb232d | 2021-11-22 14:41:18 +0000 | [diff] [blame] | 66 | ], |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 67 | } |
| 68 | |
Pawan Wagh | c14ae0d | 2023-06-08 21:16:11 +0000 | [diff] [blame] | 69 | cc_binary { |
| 70 | name: "credstore", |
| 71 | defaults: [ |
| 72 | "credstore_defaults", |
| 73 | ], |
| 74 | srcs: [ |
| 75 | "main.cpp", |
| 76 | ], |
| 77 | init_rc: ["credstore.rc"], |
| 78 | } |
| 79 | |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 80 | filegroup { |
| 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 Zeuthen | 045a2c8 | 2021-09-11 13:52:17 -0400 | [diff] [blame] | 97 | "binder/android/security/identity/ISession.aidl", |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 98 | ], |
| 99 | path: "binder", |
| 100 | } |
| 101 | |
Devin Moore | e1a6f71 | 2023-05-23 23:19:49 +0000 | [diff] [blame] | 102 | cc_library_static { |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 103 | name: "libcredstore_aidl", |
| 104 | srcs: [ |
| 105 | ":credstore_aidl", |
Aditya Choudhary | d987e9b | 2024-02-02 14:02:09 +0000 | [diff] [blame] | 106 | ], |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 107 | aidl: { |
| 108 | export_aidl_headers: true, |
| 109 | include_dirs: [ |
| 110 | "system/security/identity/binder", |
| 111 | ], |
| 112 | }, |
| 113 | shared_libs: [ |
| 114 | "libbinder", |
| 115 | "libutils", |
Devin Moore | e1a6f71 | 2023-05-23 23:19:49 +0000 | [diff] [blame] | 116 | ], |
| 117 | static_libs: [ |
David Zeuthen | ab3e565 | 2019-10-28 13:32:48 -0400 | [diff] [blame] | 118 | "libkeymaster4support", |
| 119 | ], |
| 120 | export_shared_lib_headers: [ |
| 121 | "libbinder", |
| 122 | ], |
| 123 | } |
Pawan Wagh | c14ae0d | 2023-06-08 21:16:11 +0000 | [diff] [blame] | 124 | |
| 125 | cc_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 Choudhary | d987e9b | 2024-02-02 14:02:09 +0000 | [diff] [blame] | 140 | ], |
Pawan Wagh | c14ae0d | 2023-06-08 21:16:11 +0000 | [diff] [blame] | 141 | }, |
| 142 | } |