summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Brubaker <cbrubaker@google.com>2015-04-24 10:32:18 -0700
committerChad Brubaker <cbrubaker@google.com>2015-04-24 10:57:19 -0700
commitdabe520a3e6b0d0c40adfd748483fa336c43c366 (patch)
treebb1e50640b7a736a373847c5da28b99513e019a3
parentd1af38a4783c1c0d1a5b7c76a7583beb02a88462 (diff)
downloadbase-dabe520a3e6b0d0c40adfd748483fa336c43c366.tar.gz
Add OP_AUTH_NEEDED KeyStore result code
OP_AUTH_NEEDED will be returned from begin when an operation needs a per operation authentication before calling update. Note that the begin call succeeds when this error is returned, the token and handle are valid. Change-Id: I28953add4ffd7d873fc33ba3f2cf788f72b07d06
-rw-r--r--keystore/java/android/security/KeyStore.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/keystore/java/android/security/KeyStore.java b/keystore/java/android/security/KeyStore.java
index 84a664e30163..a7b4b7a36f8b 100644
--- a/keystore/java/android/security/KeyStore.java
+++ b/keystore/java/android/security/KeyStore.java
@@ -52,6 +52,14 @@ public class KeyStore {
public static final int UNDEFINED_ACTION = 9;
public static final int WRONG_PASSWORD = 10;
+ /**
+ * Per operation authentication is needed before this operation is valid.
+ * This is returned from {@link #begin} when begin succeeds but the operation uses
+ * per-operation authentication and must authenticate before calling {@link #update} or
+ * {@link #finish}.
+ */
+ public static final int OP_AUTH_NEEDED = 15;
+
// Used for UID field to indicate the calling UID.
public static final int UID_SELF = -1;