summaryrefslogtreecommitdiffstats
path: root/keystore
diff options
context:
space:
mode:
authorOscar Montemayor <oam@google.com>2010-02-09 15:48:03 -0800
committerOscar Montemayor <oam@google.com>2010-02-09 15:48:03 -0800
commit64ef1ce9368985932f4cc7a06b3af585394c5cc6 (patch)
treecc29959241a730bee5dd0faa42fe400439e051aa /keystore
parentcdc045dd6da3db8d4ba83560a1bbe27c2ef1e5b2 (diff)
downloadframeworks_base-64ef1ce9368985932f4cc7a06b3af585394c5cc6.zip
frameworks_base-64ef1ce9368985932f4cc7a06b3af585394c5cc6.tar.gz
frameworks_base-64ef1ce9368985932f4cc7a06b3af585394c5cc6.tar.bz2
Fix for bug 2427961 android.security.tests.SystemKeyStoreTest:testBasicAccess is failing.
Fixed issues in test.
Diffstat (limited to 'keystore')
-rw-r--r--keystore/tests/src/android/security/SystemKeyStoreTest.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/keystore/tests/src/android/security/SystemKeyStoreTest.java b/keystore/tests/src/android/security/SystemKeyStoreTest.java
index a9e2687..a4d744b 100644
--- a/keystore/tests/src/android/security/SystemKeyStoreTest.java
+++ b/keystore/tests/src/android/security/SystemKeyStoreTest.java
@@ -60,7 +60,7 @@ public class SystemKeyStoreTest extends ActivityUnitTestCase<Activity> {
public void testBasicAccess() throws Exception {
try {
- byte[] newKey = mSysKeyStore.generateNewKey(128, "Blowfish", keyName);
+ byte[] newKey = mSysKeyStore.generateNewKey(128, "AES", keyName);
assertNotNull(newKey);
byte[] recKey = mSysKeyStore.retrieveKey(keyName);
assertEquals(newKey.length, recKey.length);
@@ -75,8 +75,9 @@ public class SystemKeyStoreTest extends ActivityUnitTestCase<Activity> {
assertNotNull(newKeyStr);
String recKeyStr = mSysKeyStore.retrieveKeyHexString(keyName2);
assertEquals(newKeyStr, recKeyStr);
+
mSysKeyStore.deleteKey(keyName2);
- String nullKey2 = mSysKeyStore.retrieveKeyHexString(keyName);
+ String nullKey2 = mSysKeyStore.retrieveKeyHexString(keyName2);
assertNull(nullKey2);
} catch (Exception e) {
fail();