From 481b5d663b04fc69b6a9d919b6cf70f7fbe4929c Mon Sep 17 00:00:00 2001 From: Luca Stefani Date: Wed, 17 Jan 2024 11:42:06 +0100 Subject: Format Android.bp files with bpfmt Change-Id: I083e96e3dd94a48ebad473bcfbbb7fcbb89ce466 --- keystore2/Android.bp | 8 +++--- keystore2/aaid/Android.bp | 2 +- keystore2/apc_compat/Android.bp | 10 +++---- keystore2/legacykeystore/Android.bp | 4 +-- keystore2/src/crypto/Android.bp | 48 ++++++++++++++++----------------- keystore2/src/fuzzers/Android.bp | 17 ++++++------ keystore2/src/km_compat/Android.bp | 4 +-- keystore2/test_utils/Android.bp | 4 +-- keystore2/tests/legacy_blobs/Android.bp | 12 ++++----- keystore2/watchdog/Android.bp | 4 +-- 10 files changed, 56 insertions(+), 57 deletions(-) diff --git a/keystore2/Android.bp b/keystore2/Android.bp index c378b426..ad151ad1 100644 --- a/keystore2/Android.bp +++ b/keystore2/Android.bp @@ -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, } diff --git a/keystore2/aaid/Android.bp b/keystore2/aaid/Android.bp index d0a1e775..3e90a926 100644 --- a/keystore2/aaid/Android.bp +++ b/keystore2/aaid/Android.bp @@ -27,7 +27,7 @@ cc_library { "aaid.cpp", ], shared_libs: [ - "libkeystore-attestation-application-id" + "libkeystore-attestation-application-id", ], } diff --git a/keystore2/apc_compat/Android.bp b/keystore2/apc_compat/Android.bp index 61697a85..9ca4612a 100644 --- a/keystore2/apc_compat/Android.bp +++ b/keystore2/apc_compat/Android.bp @@ -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", ], } diff --git a/keystore2/legacykeystore/Android.bp b/keystore2/legacykeystore/Android.bp index 8cb7289b..de2edc20 100644 --- a/keystore2/legacykeystore/Android.bp +++ b/keystore2/legacykeystore/Android.bp @@ -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", diff --git a/keystore2/src/crypto/Android.bp b/keystore2/src/crypto/Android.bp index c78ae418..f8da06ff 100644 --- a/keystore2/src/crypto/Android.bp +++ b/keystore2/src/crypto/Android.bp @@ -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: [ diff --git a/keystore2/src/fuzzers/Android.bp b/keystore2/src/fuzzers/Android.bp index 0809dc8b..7ddbfc09 100644 --- a/keystore2/src/fuzzers/Android.bp +++ b/keystore2/src/fuzzers/Android.bp @@ -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"], diff --git a/keystore2/src/km_compat/Android.bp b/keystore2/src/km_compat/Android.bp index 806f3dcf..36e18f0f 100644 --- a/keystore2/src/km_compat/Android.bp +++ b/keystore2/src/km_compat/Android.bp @@ -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", ], } diff --git a/keystore2/test_utils/Android.bp b/keystore2/test_utils/Android.bp index 602c98c0..4c7c18a4 100644 --- a/keystore2/test_utils/Android.bp +++ b/keystore2/test_utils/Android.bp @@ -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", diff --git a/keystore2/tests/legacy_blobs/Android.bp b/keystore2/tests/legacy_blobs/Android.bp index 92f2cc34..0f310f51 100644 --- a/keystore2/tests/legacy_blobs/Android.bp +++ b/keystore2/tests/legacy_blobs/Android.bp @@ -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", ], diff --git a/keystore2/watchdog/Android.bp b/keystore2/watchdog/Android.bp index 62ede89e..5074388c 100644 --- a/keystore2/watchdog/Android.bp +++ b/keystore2/watchdog/Android.bp @@ -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", - ] + ], } -- cgit v1.2.3