diff options
author | Max Bires <jbires@google.com> | 2018-11-02 10:50:40 -0700 |
---|---|---|
committer | Max Bires <jbires@google.com> | 2019-02-18 20:45:46 +0000 |
commit | 13f98ce5aa3f733e5e2c14b0c32020299a08a973 (patch) | |
tree | 495eb20c3891711ccbc5e1fb3f001b17ea089881 /keystore/java/android/security/KeyStore.java | |
parent | 6f82297cb1c3fbb740ae91d2d5e59603f67b1e84 (diff) |
Adding KEY_PERMANENTLY_INVALIDATED int
This is to keep it in sync with response codes in keystore.h.
This commit also adds the KeyPermanentlyInvalidatedException to all the
methods that could receive this error code out of KeyStore.
Bug: 118883532
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/AuthBoundKeyTest.java
Change-Id: I878a628824e2eeb639ec5678b1a5d3d10428a918
Diffstat (limited to 'keystore/java/android/security/KeyStore.java')
-rw-r--r-- | keystore/java/android/security/KeyStore.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/keystore/java/android/security/KeyStore.java b/keystore/java/android/security/KeyStore.java index 213ed7d1ff0a..bfce17c3e6ab 100644 --- a/keystore/java/android/security/KeyStore.java +++ b/keystore/java/android/security/KeyStore.java @@ -98,6 +98,9 @@ public class KeyStore { */ public static final int OP_AUTH_NEEDED = 15; + // Used when a user changes their pin, invalidating old auth bound keys. + public static final int KEY_PERMANENTLY_INVALIDATED = 17; + // Used for UID field to indicate the calling UID. public static final int UID_SELF = -1; @@ -1200,6 +1203,8 @@ public class KeyStore { return new KeyStoreException(errorCode, "Key blob corrupted"); case OP_AUTH_NEEDED: return new KeyStoreException(errorCode, "Operation requires authorization"); + case KEY_PERMANENTLY_INVALIDATED: + return new KeyStoreException(errorCode, "Key permanently invalidated"); default: return new KeyStoreException(errorCode, String.valueOf(errorCode)); } |