Merge "Allow system and root to access fsverity keys"
diff --git a/keystore-engine/Android.bp b/keystore-engine/Android.bp
index 60f5940..6512c66 100644
--- a/keystore-engine/Android.bp
+++ b/keystore-engine/Android.bp
@@ -63,7 +63,6 @@
         "libcrypto",
         "liblog",
         "libhidlbase",
-        "libhidltransport",
         "libcutils",
         "libutils",
     ],
diff --git a/keystore/Android.bp b/keystore/Android.bp
index 356ac1b..93c537e 100644
--- a/keystore/Android.bp
+++ b/keystore/Android.bp
@@ -62,8 +62,6 @@
         "libcutils",
         "libhardware",
         "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
         "libkeymaster4support",
         "libkeymaster_messages",
         "libkeymaster_portable",
@@ -110,7 +108,6 @@
         "libcrypto",
         "libcutils",
         "libhidlbase",
-        "libhwbinder",
         "libkeystore_aidl", // for IKeyStoreService.asInterface()
         "libkeystore_binder",
         "libkeystore_parcelables",
@@ -135,7 +132,6 @@
         "libchrome",
         "libutils",
         "libhidlbase",
-        "libhwbinder",
         "libkeymaster4support",
         "libkeystore_aidl",
         "libkeystore_binder",
@@ -163,7 +159,6 @@
         "libbinder",
         "libhardware",
         "libhidlbase",
-        "libhwbinder",
         "libkeymaster4support",
         "liblog",
         "libprotobuf-cpp-lite",
@@ -173,7 +168,6 @@
         "android.hardware.keymaster@4.0",
         "libbinder",
         "libhidlbase",
-        "libhwbinder",
         "libkeymaster4support",
     ],
 }
@@ -192,7 +186,6 @@
         "android.hardware.keymaster@4.0",
         "libbinder",
         "libhidlbase",
-        "libhwbinder",
         "libkeymaster4support",
         "libkeystore_aidl",
         "libkeystore_parcelables",
@@ -214,7 +207,6 @@
         "android.hardware.keymaster@4.0",
         "libbinder",
         "libhidlbase",
-        "libhwbinder",
         "libkeystore_aidl",
         "libkeystore_parcelables",
     ],
@@ -230,7 +222,6 @@
         "android.system.wifi.keystore@1.0",
         "libbase",
         "libhidlbase",
-        "libhidltransport",
         "liblog",
         "libutils",
     ],
@@ -261,7 +252,6 @@
         "libbinder",
         "libcrypto",
         "libhidlbase",
-        "libhwbinder",
         "libkeymaster4support",
         "libutils",
         "libkeystore_aidl",
@@ -270,7 +260,6 @@
     export_shared_lib_headers: [
         "android.hardware.keymaster@4.0",
         "libhidlbase",
-        "libhwbinder",
         "libkeymaster4support",
     ],
 
@@ -308,8 +297,6 @@
         "libcutils",
         "libhardware",
         "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
         "libkeystore_parcelables",
         "liblog",
         "libselinux",
diff --git a/keystore/key_store_service.cpp b/keystore/key_store_service.cpp
index ba8a3f3..86c0913 100644
--- a/keystore/key_store_service.cpp
+++ b/keystore/key_store_service.cpp
@@ -118,7 +118,8 @@
     auto asn1_attestation_id_result = security::gather_attestation_application_id(callingUid);
     if (!asn1_attestation_id_result.isOk()) {
         ALOGE("failed to gather attestation_id");
-        return ErrorCode::ATTESTATION_APPLICATION_ID_MISSING;
+        // Couldn't get attestation ID; just use an empty one rather than failing.
+        asn1_attestation_id_result = std::vector<uint8_t>();
     }
     std::vector<uint8_t>& asn1_attestation_id = asn1_attestation_id_result;