summaryrefslogtreecommitdiff
path: root/keystore/keystore_main.cpp
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-12-20 08:20:57 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-12-20 08:20:57 +0000
commitf53ed2ff9b51b42117bc3178bb0478234aeadebb (patch)
tree4fd5818ba4b052205b1189dd36f9a1962cca81e7 /keystore/keystore_main.cpp
parentd755b780ce2b1e884b6a1455f80d12c510f8e2f1 (diff)
parent0efbf432c1bc5bf52f93c73f8c9ba7476ce4bca7 (diff)
Snap for 4510491 from 0efbf432c1bc5bf52f93c73f8c9ba7476ce4bca7 to pi-release
Change-Id: I0fe811edf05f9ec775bf95ae1102b91a095927b4
Diffstat (limited to 'keystore/keystore_main.cpp')
-rw-r--r--keystore/keystore_main.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/keystore/keystore_main.cpp b/keystore/keystore_main.cpp
index e42d5a4..e048f88 100644
--- a/keystore/keystore_main.cpp
+++ b/keystore/keystore_main.cpp
@@ -26,14 +26,14 @@
#include <cutils/log.h>
+#include "KeyStore.h"
#include "entropy.h"
+#include "include/keystore/keystore_hidl_support.h"
+#include "include/keystore/keystore_return_types.h"
#include "key_store_service.h"
-#include "keystore.h"
+#include "legacy_keymaster_device_wrapper.h"
#include "permissions.h"
#include <android/security/IKeystoreService.h>
-#include "legacy_keymaster_device_wrapper.h"
-#include "include/keystore/keystore_hidl_support.h"
-#include "include/keystore/keystore_return_types.h"
/* KeyStore is a secured storage for key-value pairs. In this implementation,
* each file stores one key-value pair. Keys are encoded in file names, and
@@ -41,9 +41,9 @@
* user-defined password. To keep things simple, buffers are always larger than
* the maximum space we needed, so boundary checks on buffers are omitted. */
+using ::android::hardware::configureRpcThreadpool;
using ::android::system::wifi::keystore::V1_0::IKeystore;
using ::android::system::wifi::keystore::V1_0::implementation::Keystore;
-using ::android::hardware::configureRpcThreadpool;
/**
* TODO implement keystore daemon using binderized keymaster HAL.
@@ -81,14 +81,14 @@ int main(int argc, char* argv[]) {
bool allowNewFallbackDevice = false;
keystore::KeyStoreServiceReturnCode rc;
- rc = KS_HANDLE_HIDL_ERROR(dev->getHardwareFeatures(
- [&] (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.
- allowNewFallbackDevice = !supportsAttestation;
- }));
+ rc = KS_HANDLE_HIDL_ERROR(
+ dev->getHardwareFeatures([&](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.
+ allowNewFallbackDevice = !supportsAttestation;
+ }));
if (!rc.isOk()) {
return -1;