Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca7aaeae authored by Alex Klyubin's avatar Alex Klyubin
Browse files

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
parent 7fe86c47
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -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) {