Add digest support and implementation name to getHardwareFeatures

Test: Manual
Change-Id: Iee20528e8d4f3931164aa988e11bfe71be4f56dc
diff --git a/keystore/keystore.cpp b/keystore/keystore.cpp
index f7695c5..32667e0 100644
--- a/keystore/keystore.cpp
+++ b/keystore/keystore.cpp
@@ -481,13 +481,15 @@
 }
 
 bool KeyStore::isHardwareBacked(const android::String16& /*keyType*/) const {
+    using ::android::hardware::hidl_string;
     if (mDevice == NULL) {
         ALOGW("can't get keymaster device");
         return false;
     }
 
     bool isSecure = false;
-    auto hidlcb = [&] (bool _isSecure, bool, bool, bool) {
+    auto hidlcb = [&] (bool _isSecure, bool, bool, bool, bool, const hidl_string&,
+                       const hidl_string&) {
         isSecure = _isSecure;
     };
     auto rc = mDevice->getHardwareFeatures(hidlcb);
diff --git a/keystore/keystore_main.cpp b/keystore/keystore_main.cpp
index d257e94..1cdb398 100644
--- a/keystore/keystore_main.cpp
+++ b/keystore/keystore_main.cpp
@@ -43,6 +43,7 @@
  */
 
 int main(int argc, char* argv[]) {
+    using android::hardware::hidl_string;
     if (argc < 2) {
         ALOGE("A directory must be specified!");
         return 1;
@@ -74,7 +75,8 @@
 
     keystore::KeyStoreServiceReturnCode rc;
     rc = KS_HANDLE_HIDL_ERROR(dev->getHardwareFeatures(
-            [&] (bool, bool, bool, bool supportsAttestation) {
+            [&] (bool, bool, bool, bool supportsAttestation, bool, const hidl_string&,
+                 const hidl_string&) {
                 // Attestation support indicates the hardware is keymaster 2.0 or higher.
                 // For these devices we will not allow the fallback device for import or generation
                 // of keys. The fallback device is only used for legacy keys present on the device.
diff --git a/keystore/legacy_keymaster_device_wrapper.cpp b/keystore/legacy_keymaster_device_wrapper.cpp
index c57bfed..187252e 100644
--- a/keystore/legacy_keymaster_device_wrapper.cpp
+++ b/keystore/legacy_keymaster_device_wrapper.cpp
@@ -200,7 +200,7 @@
 
 // Methods from ::android::hardware::keymaster::V3_0::IKeymasterDevice follow.
 Return<void> LegacyKeymasterDeviceWrapper::getHardwareFeatures(getHardwareFeatures_cb _hidl_cb) {
-    _hidl_cb(false, false, false, false);
+    _hidl_cb(false, false, false, false, false, "Fallback Device", "Google Android Security");
     return Void();
 }