Merge "Format Android.bp files with bpfmt" into main

This commit is contained in:
Andrew Walbran 2024-01-18 19:01:27 +00:00 committed by Gerrit Code Review
commit 4a04e9195e
10 changed files with 56 additions and 57 deletions

View file

@ -49,9 +49,9 @@ rust_defaults {
"libkeystore2_apc_compat-rust",
"libkeystore2_crypto_rust",
"libkeystore2_flags_rust",
"libkeystore2_hal_names_rust",
"libkeystore2_km_compat",
"libkeystore2_selinux",
"libkeystore2_hal_names_rust",
"liblazy_static",
"liblibc",
"liblog_event_list",
@ -90,9 +90,9 @@ rust_library {
"keystore2_blob_test_utils",
],
rustlibs: [
"libkeystore2_test_utils",
"liblibsqlite3_sys",
"librusqlite",
"libkeystore2_test_utils",
],
}
@ -107,15 +107,15 @@ rust_test {
"libandroid_logger",
"libhex",
"libkeystore2_test_utils",
"libkeystore2_with_test_utils",
"liblibsqlite3_sys",
"libnix",
"librusqlite",
"libkeystore2_with_test_utils",
],
// The test should always include watchdog.
features: [
"watchdog",
"keystore2_blob_test_utils",
"watchdog",
],
require_root: true,
}

View file

@ -27,7 +27,7 @@ cc_library {
"aaid.cpp",
],
shared_libs: [
"libkeystore-attestation-application-id"
"libkeystore-attestation-application-id",
],
}

View file

@ -27,10 +27,10 @@ cc_library {
"apc_compat.cpp",
],
shared_libs: [
"libbinder_ndk",
"android.hardware.confirmationui@1.0",
"android.hardware.confirmationui-V1-ndk",
"android.hardware.confirmationui@1.0",
"libbase",
"libbinder_ndk",
"libhidlbase",
"libutils",
],
@ -43,12 +43,12 @@ rust_bindgen {
source_stem: "bindings",
bindgen_flags: [
"--allowlist-function=tryGetUserConfirmationService",
"--allowlist-function=promptUserConfirmation",
"--allowlist-function=abortUserConfirmation",
"--allowlist-function=closeUserConfirmationService",
"--allowlist-var=INVALID_SERVICE_HANDLE",
"--allowlist-function=promptUserConfirmation",
"--allowlist-function=tryGetUserConfirmationService",
"--allowlist-var=APC_COMPAT_.*",
"--allowlist-var=INVALID_SERVICE_HANDLE",
],
}

View file

@ -32,8 +32,8 @@ rust_defaults {
"libanyhow",
"libbinder_rs",
"libkeystore2_flags_rust",
"liblog_rust",
"libkeystore2_flags_rust",
"liblog_rust",
"librusqlite",
"librustutils",
"libthiserror",
@ -62,8 +62,8 @@ rust_test {
"libbinder_rs",
"libkeystore2",
"libkeystore2_flags_rust",
"libkeystore2_test_utils",
"libkeystore2_flags_rust",
"libkeystore2_test_utils",
"liblog_rust",
"librusqlite",
"librustutils",

View file

@ -32,8 +32,8 @@ rust_library {
"libthiserror",
],
shared_libs: [
"libkeystore2_crypto",
"libcrypto",
"libkeystore2_crypto",
],
vendor_available: true,
apex_available: [
@ -45,8 +45,8 @@ rust_library {
cc_library {
name: "libkeystore2_crypto",
srcs: [
"crypto.cpp",
"certificate_utils.cpp",
"crypto.cpp",
],
export_include_dirs: ["include"],
shared_libs: [
@ -69,28 +69,28 @@ rust_bindgen {
vendor_available: true,
shared_libs: ["libcrypto"],
bindgen_flags: [
"--allowlist-function", "hmacSha256",
"--allowlist-function", "randomBytes",
"--allowlist-function", "AES_gcm_encrypt",
"--allowlist-function", "AES_gcm_decrypt",
"--allowlist-function", "CreateKeyId",
"--allowlist-function", "PBKDF2",
"--allowlist-function", "HKDFExtract",
"--allowlist-function", "HKDFExpand",
"--allowlist-function", "ECDHComputeKey",
"--allowlist-function", "ECKEYGenerateKey",
"--allowlist-function", "ECKEYMarshalPrivateKey",
"--allowlist-function", "ECKEYParsePrivateKey",
"--allowlist-function", "EC_KEY_get0_public_key",
"--allowlist-function", "ECPOINTPoint2Oct",
"--allowlist-function", "ECPOINTOct2Point",
"--allowlist-function", "EC_KEY_free",
"--allowlist-function", "EC_POINT_free",
"--allowlist-function", "extractSubjectFromCertificate",
"--allowlist-type", "EC_KEY",
"--allowlist-type", "EC_POINT",
"--allowlist-var", "EC_MAX_BYTES",
"--allowlist-var", "EVP_MAX_MD_SIZE",
"--allowlist-function=AES_gcm_decrypt",
"--allowlist-function=AES_gcm_encrypt",
"--allowlist-function=CreateKeyId",
"--allowlist-function=ECDHComputeKey",
"--allowlist-function=ECKEYGenerateKey",
"--allowlist-function=ECKEYMarshalPrivateKey",
"--allowlist-function=ECKEYParsePrivateKey",
"--allowlist-function=ECPOINTOct2Point",
"--allowlist-function=ECPOINTPoint2Oct",
"--allowlist-function=EC_KEY_free",
"--allowlist-function=EC_KEY_get0_public_key",
"--allowlist-function=EC_POINT_free",
"--allowlist-function=HKDFExpand",
"--allowlist-function=HKDFExtract",
"--allowlist-function=PBKDF2",
"--allowlist-function=extractSubjectFromCertificate",
"--allowlist-function=hmacSha256",
"--allowlist-function=randomBytes",
"--allowlist-type=EC_KEY",
"--allowlist-type=EC_POINT",
"--allowlist-var=EC_MAX_BYTES",
"--allowlist-var=EVP_MAX_MD_SIZE",
],
cflags: ["-DBORINGSSL_NO_CXX"],
apex_available: [

View file

@ -20,13 +20,13 @@ rust_fuzz {
name: "keystore2_unsafe_fuzzer",
srcs: ["keystore2_unsafe_fuzzer.rs"],
rustlibs: [
"libarbitrary",
"libkeystore2",
"libkeystore2_crypto_rust",
"libkeystore2_hal_names_rust",
"libkeystore2_aaid-rust",
"libkeystore2_apc_compat-rust",
"libkeystore2_crypto_rust",
"libkeystore2_hal_names_rust",
"libkeystore2_selinux",
"libarbitrary",
],
fuzz_config: {
fuzz_on_haiku_device: true,
@ -38,19 +38,18 @@ rust_fuzz {
},
}
rust_fuzz {
name: "authorization_service_fuzzer",
srcs: ["aidl-fuzzers/authorization_service_fuzzer.rs"],
rustlibs: [
"libbinder_random_parcel_rs",
"libbinder_rs",
"libkeystore2",
"libkeystore2_crypto_rust",
"libkeystore2_hal_names_rust",
"libkeystore2_aaid-rust",
"libkeystore2_apc_compat-rust",
"libkeystore2_crypto_rust",
"libkeystore2_hal_names_rust",
"libkeystore2_selinux",
"libbinder_rs",
"libbinder_random_parcel_rs",
],
fuzz_config: {
fuzz_on_haiku_device: true,
@ -58,7 +57,7 @@ rust_fuzz {
cc: [
"android-media-fuzzing-reports@google.com",
"smoreland@google.com",
"waghpawan@google.com"
"waghpawan@google.com",
],
// Adds bugs to hotlist "AIDL fuzzers bugs" on buganizer
hotlists: ["4637097"],

View file

@ -33,7 +33,7 @@ rust_library {
],
shared_libs: [
"libkm_compat_service",
]
],
}
rust_test {
@ -91,9 +91,9 @@ cc_library {
"android.security.compat-ndk",
"libbinder_ndk",
"libcrypto",
"libkm_compat",
"libkeymaster4_1support",
"libkeystore2_crypto",
"libkm_compat",
],
}

View file

@ -28,6 +28,7 @@ rust_defaults {
"keystore2_use_latest_aidl_rust",
],
rustlibs: [
"android.security.authorization-rust",
"libanyhow",
"libbinder_rs",
"libcxx",
@ -39,11 +40,10 @@ rust_defaults {
"libserde",
"libserde_cbor",
"libthiserror",
"android.security.authorization-rust",
],
static_libs: [
"libkeystore2_ffi_test_utils",
"libkeystore-engine",
"libkeystore2_ffi_test_utils",
],
shared_libs: [
"android.system.keystore2-V4-ndk",

View file

@ -31,17 +31,17 @@ rust_test {
test_config: "AndroidTest.xml",
rustlibs: [
"libkeystore2_with_test_utils",
"libkeystore2_crypto_rust",
"android.security.maintenance-rust",
"android.security.authorization-rust",
"librustutils",
"libkeystore2_test_utils",
"libnix",
"android.security.maintenance-rust",
"libanyhow",
"libbinder_rs",
"libkeystore2_crypto_rust",
"libkeystore2_test_utils",
"libkeystore2_with_test_utils",
"liblazy_static",
"liblibc",
"libnix",
"librustutils",
"libserde",
"libthiserror",
],

View file

@ -27,7 +27,7 @@ rust_defaults {
srcs: ["src/lib.rs"],
rustlibs: [
"liblog_rust",
]
],
}
rust_library {
@ -45,5 +45,5 @@ rust_test {
test_suites: ["general-tests"],
rustlibs: [
"libandroid_logger",
]
],
}