diff options
author | Alex Klyubin <klyubin@google.com> | 2015-04-10 17:51:44 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-04-10 17:51:49 +0000 |
commit | a270264c61daa42a5b03bbb1e7f23e77780f8fc0 (patch) | |
tree | 6a6d74772e702c5fa82b69055e1f4043aaac0ab4 /keystore | |
parent | 08d76a946b898af28f3c8125cdf4966195b718fb (diff) | |
parent | 55f7c2770faade3543bebd833124f2f15c0f7455 (diff) | |
download | frameworks_base-a270264c61daa42a5b03bbb1e7f23e77780f8fc0.zip frameworks_base-a270264c61daa42a5b03bbb1e7f23e77780f8fc0.tar.gz frameworks_base-a270264c61daa42a5b03bbb1e7f23e77780f8fc0.tar.bz2 |
Merge "Track more changes to keymaster_defs.h"
Diffstat (limited to 'keystore')
-rw-r--r-- | keystore/tests/src/android/security/KeyStoreTest.java | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/keystore/tests/src/android/security/KeyStoreTest.java b/keystore/tests/src/android/security/KeyStoreTest.java index c9a140c..6e3f8be 100644 --- a/keystore/tests/src/android/security/KeyStoreTest.java +++ b/keystore/tests/src/android/security/KeyStoreTest.java @@ -798,7 +798,7 @@ public class KeyStoreTest extends ActivityUnitTestCase<Activity> { // TODO: Verify we have an RSA public key that's well formed. } - public void testAesOcbEncryptSuccess() throws Exception { + public void testAesGcmEncryptSuccess() throws Exception { String name = "test"; KeymasterArguments args = new KeymasterArguments(); args.addInt(KeymasterDefs.KM_TAG_PURPOSE, KeymasterDefs.KM_PURPOSE_ENCRYPT); @@ -806,7 +806,7 @@ public class KeyStoreTest extends ActivityUnitTestCase<Activity> { args.addInt(KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_AES); args.addInt(KeymasterDefs.KM_TAG_PADDING, KeymasterDefs.KM_PAD_NONE); args.addInt(KeymasterDefs.KM_TAG_KEY_SIZE, 256); - args.addInt(KeymasterDefs.KM_TAG_BLOCK_MODE, KeymasterDefs.KM_MODE_OCB); + args.addInt(KeymasterDefs.KM_TAG_BLOCK_MODE, KeymasterDefs.KM_MODE_GCM); args.addInt(KeymasterDefs.KM_TAG_CHUNK_LENGTH, 4096); args.addInt(KeymasterDefs.KM_TAG_MAC_LENGTH, 16); args.addBoolean(KeymasterDefs.KM_TAG_NO_AUTH_REQUIRED); @@ -903,9 +903,7 @@ public class KeyStoreTest extends ActivityUnitTestCase<Activity> { args.addInt(KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_AES); args.addInt(KeymasterDefs.KM_TAG_PADDING, KeymasterDefs.KM_PAD_NONE); args.addInt(KeymasterDefs.KM_TAG_KEY_SIZE, 256); - args.addInt(KeymasterDefs.KM_TAG_BLOCK_MODE, KeymasterDefs.KM_MODE_OCB); - args.addInt(KeymasterDefs.KM_TAG_CHUNK_LENGTH, 4096); - args.addInt(KeymasterDefs.KM_TAG_MAC_LENGTH, 16); + args.addInt(KeymasterDefs.KM_TAG_BLOCK_MODE, KeymasterDefs.KM_MODE_CTR); args.addBoolean(KeymasterDefs.KM_TAG_NO_AUTH_REQUIRED); KeyCharacteristics outCharacteristics = new KeyCharacteristics(); @@ -935,11 +933,9 @@ public class KeyStoreTest extends ActivityUnitTestCase<Activity> { args.addInt(KeymasterDefs.KM_TAG_PURPOSE, KeymasterDefs.KM_PURPOSE_ENCRYPT); args.addInt(KeymasterDefs.KM_TAG_PURPOSE, KeymasterDefs.KM_PURPOSE_DECRYPT); args.addInt(KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_AES); - args.addInt(KeymasterDefs.KM_TAG_PADDING, KeymasterDefs.KM_PAD_NONE); + args.addInt(KeymasterDefs.KM_TAG_PADDING, KeymasterDefs.KM_PAD_PKCS7); args.addInt(KeymasterDefs.KM_TAG_KEY_SIZE, 256); - args.addInt(KeymasterDefs.KM_TAG_BLOCK_MODE, KeymasterDefs.KM_MODE_OCB); - args.addInt(KeymasterDefs.KM_TAG_CHUNK_LENGTH, 4096); - args.addInt(KeymasterDefs.KM_TAG_MAC_LENGTH, 16); + args.addInt(KeymasterDefs.KM_TAG_BLOCK_MODE, KeymasterDefs.KM_MODE_ECB); args.addInt(KeymasterDefs.KM_TAG_USER_AUTH_TYPE, 1); KeyCharacteristics outCharacteristics = new KeyCharacteristics(); |