summaryrefslogtreecommitdiffstats
path: root/keystore
diff options
context:
space:
mode:
authorAlex Klyubin <klyubin@google.com>2015-07-06 14:09:01 -0700
committerAlex Klyubin <klyubin@google.com>2015-07-06 14:09:01 -0700
commitca7aaeaeee616d9d1d557ee2fb19dd14783be1f0 (patch)
tree3c01cc34d321b2c4122856d80b98dd0cd394b0cd /keystore
parent7fe86c4753e88058a7f1a1bf8d0302df9a64bd2e (diff)
downloadframeworks_base-ca7aaeaeee616d9d1d557ee2fb19dd14783be1f0.zip
frameworks_base-ca7aaeaeee616d9d1d557ee2fb19dd14783be1f0.tar.gz
frameworks_base-ca7aaeaeee616d9d1d557ee2fb19dd14783be1f0.tar.bz2
Support loading AES keys with authorized digests.
Due to a bug, Android Keystore failed to load AES keys authorized for use with one or more digests. This CL fixes this bug. Bug: 22300737 Change-Id: Ia49e27833dddb526565e4dc4977ed1e352e5836b
Diffstat (limited to 'keystore')
-rw-r--r--keystore/java/android/security/keystore/KeyProperties.java4
1 files changed, 0 insertions, 4 deletions
diff --git a/keystore/java/android/security/keystore/KeyProperties.java b/keystore/java/android/security/keystore/KeyProperties.java
index f9fe176..2b49297 100644
--- a/keystore/java/android/security/keystore/KeyProperties.java
+++ b/keystore/java/android/security/keystore/KeyProperties.java
@@ -210,10 +210,6 @@ public abstract class KeyProperties {
int keymasterAlgorithm, int keymasterDigest) {
switch (keymasterAlgorithm) {
case KeymasterDefs.KM_ALGORITHM_AES:
- if (keymasterDigest != -1) {
- throw new IllegalArgumentException("Digest not supported for AES key: "
- + Digest.fromKeymaster(keymasterDigest));
- }
return KEY_ALGORITHM_AES;
case KeymasterDefs.KM_ALGORITHM_HMAC:
switch (keymasterDigest) {