summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2011-06-29 10:46:35 -0700
committerBrian Carlstrom <bdc@google.com>2011-06-29 16:57:19 -0700
commit8dde66b240e5777c3c831767914e9ef773384aac (patch)
tree8f6ce6c7c41202f8a5fd9d206853cb3ef539e598 /tests
parent4bf9e1a31db0a63b67928187214f3e9328d9183f (diff)
downloadKeyChain-8dde66b240e5777c3c831767914e9ef773384aac.tar.gz
Tracking move to KeyChain credential installation API
Bug: 3497064 Change-Id: I1d3017ec285b5f1d271ce4f731ec37a7b663eb8e
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/keychain/tests/KeyChainTestActivity.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/src/com/android/keychain/tests/KeyChainTestActivity.java b/tests/src/com/android/keychain/tests/KeyChainTestActivity.java
index c5ff34f..0033482 100644
--- a/tests/src/com/android/keychain/tests/KeyChainTestActivity.java
+++ b/tests/src/com/android/keychain/tests/KeyChainTestActivity.java
@@ -22,7 +22,6 @@ import android.os.AsyncTask;
import android.os.Bundle;
import android.os.RemoteException;
import android.os.StrictMode;
-import android.security.Credentials;
import android.security.KeyChain;
import android.security.KeyChainAliasCallback;
import android.security.KeyChainException;
@@ -164,9 +163,9 @@ public class KeyChainTestActivity extends Activity {
try {
log("Requesting install of server's CA...");
X509Certificate ca = mTestKeyStore.getRootCertificate("RSA");
- Intent intent = new Intent("android.credentials.INSTALL");
- intent.putExtra("name", TAG); // "name" = CredentialHelper.CERT_NAME_KEY
- intent.putExtra(Credentials.CERTIFICATE, Credentials.convertToPem(ca));
+ Intent intent = KeyChain.createInstallIntent();
+ intent.putExtra(KeyChain.EXTRA_NAME, TAG);
+ intent.putExtra(KeyChain.EXTRA_CERTIFICATE, ca.getEncoded());
startActivityForResult(intent, REQUEST_CA_INSTALL);
} catch (Exception e) {
throw new AssertionError(e);