This is a demo application highlighting how to use the KeyChain APIs introduced in API Level 14.

The source code for this demo app shows how to install a PKCS12 key chain stored in the assets folder, grant permission to the app to use the installed key chain and finally display the certificate and private key info. The app also has a simple implementation of a web server listening to requests at an SSL socket using the same certificate in the key chain.

The application includes the following key classes:

If you are developing an application that uses the KeyChain APIs, remember that the feature is supported only on Android 4.0 (API level 14) and higher versions of the platform. To ensure that your application can only be installed on devices that are running Android 4.0, remember to add the following to the application's manifest:

Note: Due to browser cache, you need to restart the browser completely before it can recognize any keystore updates. The easiest way to do this is to dismiss the app in the Recent Apps list.

For more information about using the KeyChain API, see the android.security.KeyChain documentation.