diff options
author | Brian Carlstrom <bdc@google.com> | 2011-06-24 02:13:28 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2011-06-25 15:22:37 -0700 |
commit | fcd5fb26acec88e98c3bedb41d4510888f7890cd (patch) | |
tree | 3cea9c607b137956cffbca900c7895a79d36fe5b /src/com/android/certinstaller | |
parent | 5ac873d6c63cf2bb6b173d11ce619808e261996e (diff) | |
download | android_packages_apps_CertInstaller-fcd5fb26acec88e98c3bedb41d4510888f7890cd.tar.gz android_packages_apps_CertInstaller-fcd5fb26acec88e98c3bedb41d4510888f7890cd.tar.bz2 android_packages_apps_CertInstaller-fcd5fb26acec88e98c3bedb41d4510888f7890cd.zip |
Replace KeyChainActivity placeholder UI with more polished dialog (3 of 5)
frameworks/base
Extended KeyChain.chooserPrivateKeyAlias to allow caller to supply
preferred choice to be selected in chooser. This allows Email
settings to highlight the current choice when allowing user to
change settings.
keystore/java/android/security/KeyChain.java
api/current.txt
Implemented KeyChain functionality to pass host and port
information to KeyChainActivity for display.
keystore/java/android/security/KeyChain.java
KeyChain now sends a PendingIntent as part of the Intent it sends
to the KeyChainActivity which can be used to identify the caller
in reliable way.
keystore/java/android/security/KeyChain.java
Moved .pfx/.p12/.cer/.crt constants to Credentials for reuse.
Added Credentials.install variant with no value for use from KeyChainActivity
keystore/java/android/security/Credentials.java
packages/apps/CertInstaller
Source of extension constants now in Credentials
src/com/android/certinstaller/CertFile.java
packages/apps/Browser
Have browser supply host and port information to KeyChain.choosePrivateKeyAlias
Tracking KeyChain.choosePrivateKeyAlias API change
src/com/android/browser/Tab.java
packages/apps/Email
Tracking KeyChain.choosePrivateKeyAlias API change
src/com/android/email/view/CertificateSelector.java
packages/apps/KeyChain
KeyChain now depends on bouncycastle X509Name for formatting
X500Principals, since the 4 X500Principal formatting options could
not format emailAddress attributes in a human readable way and its
the most important attribute to display for client certificates in
most cases.
Android.mk
Changing the UI to a dialog, make the activity style transparent.
AndroidManifest.xml
res/values/styles.xml
Layout for chooser dialog
res/layout/cert_chooser.xml
Layout for list items in chooser
res/layout/cert_item.xml
New resources for dialog including comments for translators.
res/values/strings.xml
New dialog based KeyChainActivity. Now also shows requesting app
and requesting server. Now can preselect a specified alias. New
link directly to CertInstaller.
src/com/android/keychain/KeyChainActivity.java
Fix KeyChainTestActivity to work with TestKeyStore changes that
were causing network activity on the UI to look up the name of
localhost. Also track KeyChain.choosePrivateKeyAlias API change.
tests/src/com/android/keychain/tests/KeyChainTestActivity.java
Change-Id: I789faaf65cb36ddc16ce8cd1e8a803b0bde745e3
Diffstat (limited to 'src/com/android/certinstaller')
-rw-r--r-- | src/com/android/certinstaller/CertFile.java | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/com/android/certinstaller/CertFile.java b/src/com/android/certinstaller/CertFile.java index 6974030..c2701f9 100644 --- a/src/com/android/certinstaller/CertFile.java +++ b/src/com/android/certinstaller/CertFile.java @@ -42,13 +42,6 @@ public class CertFile extends PreferenceActivity implements FileFilter { private static final String TAG = "CertFile"; - // historically used by Android - private static final String EXTENSION_CRT = ".crt"; - private static final String EXTENSION_P12 = ".p12"; - // commonly used on Windows - private static final String EXTENSION_CER = ".cer"; - private static final String EXTENSION_PFX = ".pfx"; - private static final String CERT_FILE_KEY = "cf"; private static final int MAX_FILE_SIZE = 1000000; protected static final int REQUEST_INSTALL_CODE = 1; @@ -162,10 +155,10 @@ public class CertFile extends PreferenceActivity implements FileFilter { } protected boolean isFileAcceptable(String path) { - return (path.endsWith(EXTENSION_CRT) || - path.endsWith(EXTENSION_P12) || - path.endsWith(EXTENSION_CER) || - path.endsWith(EXTENSION_PFX)); + return (path.endsWith(Credentials.EXTENSION_CRT) || + path.endsWith(Credentials.EXTENSION_P12) || + path.endsWith(Credentials.EXTENSION_CER) || + path.endsWith(Credentials.EXTENSION_PFX)); } protected boolean isSdCardPresent() { @@ -176,9 +169,11 @@ public class CertFile extends PreferenceActivity implements FileFilter { private void install(String fileName, byte[] value) { Intent intent = new Intent(this, CertInstaller.class); intent.putExtra(CredentialHelper.CERT_NAME_KEY, fileName); - if (fileName.endsWith(EXTENSION_PFX) || fileName.endsWith(EXTENSION_P12)) { + if (fileName.endsWith(Credentials.EXTENSION_PFX) + || fileName.endsWith(Credentials.EXTENSION_P12)) { intent.putExtra(Credentials.PKCS12, value); - } else if (fileName.endsWith(EXTENSION_CER) || fileName.endsWith(EXTENSION_CRT)) { + } else if (fileName.endsWith(Credentials.EXTENSION_CER) + || fileName.endsWith(Credentials.EXTENSION_CRT)) { intent.putExtra(Credentials.CERTIFICATE, value); } else { throw new AssertionError(fileName); |