diff options
author | Alex Klyubin <klyubin@google.com> | 2015-03-27 16:53:44 -0700 |
---|---|---|
committer | Alex Klyubin <klyubin@google.com> | 2015-03-30 12:53:23 -0700 |
commit | 4ab8ea4498aa25eafdbaadd238fed6eab3f6ee59 (patch) | |
tree | 57c29e100d399530f239961857c47598bb471b19 /keystore/java/android/security/KeymasterUtils.java | |
parent | 36ee836d2f6e6df59d6a20a69421639bacf25559 (diff) |
Add HmacSHA256 backed by AndroidKeyStore.
This also adds the MAC length constraint on imported HMAC keys. HMAC
doesn't work without this constraint at the moment.
Bug: 18088752
Change-Id: I8613f58f5d2a84df00bcf6179d13e30619440330
Diffstat (limited to 'keystore/java/android/security/KeymasterUtils.java')
-rw-r--r-- | keystore/java/android/security/KeymasterUtils.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/keystore/java/android/security/KeymasterUtils.java b/keystore/java/android/security/KeymasterUtils.java index e6e88c741dfd..4f175864a9df 100644 --- a/keystore/java/android/security/KeymasterUtils.java +++ b/keystore/java/android/security/KeymasterUtils.java @@ -13,9 +13,11 @@ public abstract class KeymasterUtils { case KeymasterDefs.KM_ERROR_INVALID_AUTHORIZATION_TIMEOUT: // The name of this parameter significantly differs between Keymaster and framework // APIs. Use the framework wording to make life easier for developers. - return new KeymasterException("Invalid user authentication validity duration"); + return new KeymasterException(keymasterErrorCode, + "Invalid user authentication validity duration"); default: - return new KeymasterException(KeymasterDefs.getErrorMessage(keymasterErrorCode)); + return new KeymasterException(keymasterErrorCode, + KeymasterDefs.getErrorMessage(keymasterErrorCode)); } } } |