123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322 |
- cc_defaults {
- name: "keystore_defaults",
- cflags: [
- "-Wall",
- "-Werror",
- "-Wextra",
- "-Wunused",
- ],
- sanitize: {
- misc_undefined: [
- "signed-integer-overflow",
- "unsigned-integer-overflow",
- "shift",
- "integer-divide-by-zero",
- "implicit-unsigned-integer-truncation",
- // BUG: 123630767
- //"implicit-signed-integer-truncation",
- "implicit-integer-sign-change",
- ],
- },
- clang: true,
- }
- cc_binary {
- name: "keystore",
- defaults: ["keystore_defaults"],
- srcs: [
- ":IKeyAttestationApplicationIdProvider.aidl",
- "KeyStore.cpp",
- "auth_token_table.cpp",
- "blob.cpp",
- "confirmation_manager.cpp",
- "grant_store.cpp",
- "key_config.proto",
- "key_proto_handler.cpp",
- "key_store_service.cpp",
- "keyblob_utils.cpp",
- "keymaster_enforcement.cpp",
- "keymaster_worker.cpp",
- "keystore_attestation_id.cpp",
- "keystore_main.cpp",
- "keystore_utils.cpp",
- "legacy_keymaster_device_wrapper.cpp",
- "operation.cpp",
- "operation_config.proto",
- "operation_proto_handler.cpp",
- "permissions.cpp",
- "user_state.cpp",
- ],
- shared_libs: [
- "[email protected]",
- "[email protected]",
- "[email protected]",
- "[email protected]",
- "libbase",
- "libbinder",
- "libcrypto",
- "libcutils",
- "libhardware",
- "libhidlbase",
- "libhidltransport",
- "libhwbinder",
- "libkeymaster4support",
- "libkeymaster_messages",
- "libkeymaster_portable",
- "libkeystore_aidl",
- "libkeystore_binder",
- "libkeystore_parcelables",
- "liblog",
- "libprotobuf-cpp-lite",
- "libselinux",
- "libservices",
- "libsoftkeymasterdevice",
- "libutils",
- "libwifikeystorehal",
- ],
- init_rc: ["keystore.rc"],
- aidl: {
- include_dirs: ["frameworks/base/core/java/"],
- },
- product_variables: {
- pdk: {
- enabled: false,
- },
- debuggable: {
- cflags: [
- // Allow VTS tests running as root to have
- // additional permissions.
- "-DGRANT_ROOT_ALL_PERMISSIONS",
- ],
- },
- },
- required: ["keystore_cli_v2"],
- }
- cc_binary {
- name: "keystore_cli",
- defaults: ["keystore_defaults"],
- srcs: ["keystore_cli.cpp"],
- shared_libs: [
- "[email protected]",
- "libbinder",
- "libcrypto",
- "libcutils",
- "libhidlbase",
- "libhwbinder",
- "libkeystore_aidl", // for IKeyStoreService.asInterface()
- "libkeystore_binder",
- "libkeystore_parcelables",
- "liblog",
- "libutils",
- ],
- }
- cc_binary {
- name: "keystore_cli_v2",
- defaults: ["keystore_defaults"],
- cflags: [
- "-DKEYMASTER_NAME_TAGS",
- "-Wno-unused-parameter",
- ],
- srcs: ["keystore_cli_v2.cpp"],
- shared_libs: [
- "[email protected]",
- "libbinder",
- "[email protected]",
- "libchrome",
- "libutils",
- "libhidlbase",
- "libhwbinder",
- "libkeymaster4support",
- "libkeystore_aidl",
- "libkeystore_binder",
- "libkeystore_parcelables",
- ],
- local_include_dirs: ["include"],
- }
- cc_library_shared {
- name: "libkeystore_parcelables",
- defaults: ["keystore_defaults"],
- export_include_dirs: ["include"],
- srcs: [
- "KeyAttestationApplicationId.cpp",
- "KeyAttestationPackageInfo.cpp",
- "KeymasterArguments.cpp",
- "keystore_aidl_hidl_marshalling_utils.cpp",
- "KeystoreResponse.cpp",
- "OperationResult.cpp",
- "Signature.cpp",
- ],
- shared_libs: [
- "[email protected]",
- "libbinder",
- "libhardware",
- "libhidlbase",
- "libhwbinder",
- "libkeymaster4support",
- "liblog",
- "libprotobuf-cpp-lite",
- "libutils",
- ],
- export_shared_lib_headers: [
- "[email protected]",
- "libbinder",
- "libhidlbase",
- "libhwbinder",
- "libkeymaster4support",
- ],
- }
- // Library for keystore clients
- cc_library_shared {
- name: "libkeystore_binder",
- defaults: ["keystore_defaults"],
- srcs: [
- "keyblob_utils.cpp",
- "keystore_client.proto",
- "keystore_client_impl.cpp",
- "keystore_get.cpp",
- ],
- shared_libs: [
- "[email protected]",
- "libbinder",
- "libhidlbase",
- "libhwbinder",
- "libkeymaster4support",
- "libkeystore_aidl",
- "libkeystore_parcelables",
- "liblog",
- "libprotobuf-cpp-lite",
- "libutils",
- ],
- proto: {
- type: "lite",
- export_proto_headers: true,
- },
- aidl: {
- export_aidl_headers: true,
- include_dirs: ["frameworks/base/core/java/"],
- },
- export_include_dirs: ["include"],
- export_shared_lib_headers: [
- "[email protected]",
- "libbinder",
- "libhidlbase",
- "libhwbinder",
- "libkeystore_aidl",
- "libkeystore_parcelables",
- ],
- }
- // Library for keystore clients using the WiFi HIDL interface
- cc_library_shared {
- name: "libkeystore-wifi-hidl",
- defaults: ["keystore_defaults"],
- srcs: ["keystore_get_wifi_hidl.cpp"],
- shared_libs: [
- "[email protected]",
- "libbase",
- "libhidlbase",
- "libhidltransport",
- "liblog",
- "libutils",
- ],
- export_include_dirs: ["include"],
- vendor: true,
- }
- // Library for unit tests
- cc_library_static {
- name: "libkeystore_test",
- defaults: ["keystore_defaults"],
- srcs: [
- ":IKeyAttestationApplicationIdProvider.aidl",
- "auth_token_table.cpp",
- "blob.cpp",
- "keystore_attestation_id.cpp",
- "KeyAttestationApplicationId.cpp",
- "KeyAttestationPackageInfo.cpp",
- "Signature.cpp",
- ],
- cflags: [ "-O0", ],
- static_libs: ["libgtest_main"],
- shared_libs: [
- "[email protected]",
- "libbinder",
- "libcrypto",
- "libhidlbase",
- "libhwbinder",
- "libkeymaster4support",
- "libutils",
- "libkeystore_aidl",
- "libkeystore_parcelables",
- ],
- export_shared_lib_headers: [
- "[email protected]",
- "libhidlbase",
- "libhwbinder",
- "libkeymaster4support",
- ],
- aidl: {
- include_dirs: ["frameworks/base/core/java/"],
- },
- export_include_dirs: ["include"],
- }
- filegroup {
- name: "keystore_aidl",
- srcs: [
- "binder/android/security/IConfirmationPromptCallback.aidl",
- "binder/android/security/keystore/IKeystoreCertificateChainCallback.aidl",
- "binder/android/security/keystore/IKeystoreExportKeyCallback.aidl",
- "binder/android/security/keystore/IKeystoreKeyCharacteristicsCallback.aidl",
- "binder/android/security/keystore/IKeystoreOperationResultCallback.aidl",
- "binder/android/security/keystore/IKeystoreResponseCallback.aidl",
- "binder/android/security/keystore/IKeystoreService.aidl",
- ],
- path: "binder",
- }
- cc_library_shared {
- name: "libkeystore_aidl",
- srcs: [":keystore_aidl"],
- aidl: {
- export_aidl_headers: true,
- include_dirs: [
- "system/security/keystore/binder",
- ],
- },
- shared_libs: [
- "libbinder",
- "libcutils",
- "libhardware",
- "libhidlbase",
- "libhidltransport",
- "libhwbinder",
- "libkeystore_parcelables",
- "liblog",
- "libselinux",
- "libutils",
- ],
- export_shared_lib_headers: [
- "libbinder",
- "libkeystore_parcelables",
- ],
- }
|