summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Brubaker <cbrubaker@google.com>2015-03-25 19:35:00 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-03-25 19:35:01 +0000
commit704aa5ae48b5c0ff3e330aba9611723840396fdb (patch)
tree98ab802f0026b1d0fe49f8834a18c8707ea88a68
parent6326f964769c603382ee6694b33954b4ff9b9a52 (diff)
parent9f47709f8bef8f3d67e7e17e69aee2d73b4ff9ed (diff)
downloadframeworks_base-704aa5ae48b5c0ff3e330aba9611723840396fdb.zip
frameworks_base-704aa5ae48b5c0ff3e330aba9611723840396fdb.tar.gz
frameworks_base-704aa5ae48b5c0ff3e330aba9611723840396fdb.tar.bz2
Merge "Use correct tag type for RSA exponent"
-rw-r--r--keystore/tests/src/android/security/KeyStoreTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/keystore/tests/src/android/security/KeyStoreTest.java b/keystore/tests/src/android/security/KeyStoreTest.java
index cb77455..f755bb0 100644
--- a/keystore/tests/src/android/security/KeyStoreTest.java
+++ b/keystore/tests/src/android/security/KeyStoreTest.java
@@ -713,8 +713,8 @@ public class KeyStoreTest extends ActivityUnitTestCase<Activity> {
args.addInt(KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_RSA);
args.addInt(KeymasterDefs.KM_TAG_PADDING, KeymasterDefs.KM_PAD_NONE);
args.addInt(KeymasterDefs.KM_TAG_KEY_SIZE, 2048);
- args.addBlob(KeymasterDefs.KM_TAG_RSA_PUBLIC_EXPONENT,
- RSAKeyGenParameterSpec.F4.toByteArray());
+ args.addLong(KeymasterDefs.KM_TAG_RSA_PUBLIC_EXPONENT,
+ RSAKeyGenParameterSpec.F4.longValue());
KeyCharacteristics outCharacteristics = new KeyCharacteristics();
int result = mKeyStore.generateKey(name, args, 0, outCharacteristics);
@@ -752,8 +752,8 @@ public class KeyStoreTest extends ActivityUnitTestCase<Activity> {
args.addInt(KeymasterDefs.KM_TAG_KEY_SIZE, 2048);
args.addInt(KeymasterDefs.KM_TAG_BLOCK_MODE, KeymasterDefs.KM_MODE_ECB);
args.addBlob(KeymasterDefs.KM_TAG_APPLICATION_ID, id);
- args.addBlob(KeymasterDefs.KM_TAG_RSA_PUBLIC_EXPONENT,
- RSAKeyGenParameterSpec.F4.toByteArray());
+ args.addLong(KeymasterDefs.KM_TAG_RSA_PUBLIC_EXPONENT,
+ RSAKeyGenParameterSpec.F4.longValue());
KeyCharacteristics outCharacteristics = new KeyCharacteristics();
int result = mKeyStore.generateKey(name, args, 0, outCharacteristics);