summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian C. Young <bcyoung@google.com>2017-11-16 15:45:19 -0800
committerBrian C. Young <bcyoung@google.com>2018-02-15 11:22:40 -0800
commita684cb6c2cee0835065b123e4bb698487de26939 (patch)
treea53ba0cd3d38a64eb284a73a065f41f304f71a97
parent8a6fed0d280014d84fe0f6a802f1cf29600e5bae (diff)
downloadlibhardware-a684cb6c2cee0835065b123e4bb698487de26939.tar.gz
Restore "Add "Unlocked device required" parameter to keys"
Add a keymaster parameter for keys that should be inaccessible when the device screen is locked. "Locked" here is a state where the device can be used or accessed without any further trust factor such as a PIN, password, fingerprint, or trusted face or voice. This parameter is added to the Java keystore interface for key creation and import, as well as enums specified by and for the native keystore process. This reverts commit 680068e9f224b9f82ab85034ca16a14395799e0b. Test: CTS tests in I8a5affd1eaed176756175158e3057e44934fffed Bug: 67752510 Change-Id: I9f3ea694f676801dc3dd348301544a603574edc7
-rw-r--r--include/hardware/keymaster_defs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hardware/keymaster_defs.h b/include/hardware/keymaster_defs.h
index 6e812f29..25a4faac 100644
--- a/include/hardware/keymaster_defs.h
+++ b/include/hardware/keymaster_defs.h
@@ -112,6 +112,8 @@ typedef enum {
KM_TAG_ALLOW_WHILE_ON_BODY = KM_BOOL | 506, /* Allow key to be used after authentication timeout
* if device is still on-body (requires secure
* on-body sensor. */
+ KM_TAG_UNLOCKED_DEVICE_REQUIRED = KM_BOOL | 508, /* Require the device screen to be unlocked if the
+ * key is used. */
/* Application access control */
KM_TAG_ALL_APPLICATIONS = KM_BOOL | 600, /* Specified to indicate key is usable by all
@@ -452,6 +454,7 @@ typedef enum {
KM_ERROR_KEYMASTER_NOT_CONFIGURED = -64,
KM_ERROR_ATTESTATION_APPLICATION_ID_MISSING = -65,
KM_ERROR_CANNOT_ATTEST_IDS = -66,
+ KM_ERROR_DEVICE_LOCKED = -71,
KM_ERROR_UNIMPLEMENTED = -100,
KM_ERROR_VERSION_MISMATCH = -101,