From ca7aaeaeee616d9d1d557ee2fb19dd14783be1f0 Mon Sep 17 00:00:00 2001 From: Alex Klyubin Date: Mon, 6 Jul 2015 14:09:01 -0700 Subject: 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 --- keystore/java/android/security/keystore/KeyProperties.java | 4 ---- 1 file changed, 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) { -- cgit v1.1