custom-cert-https
custom-cert-https copied to clipboard
Custom certificate trust store on Android sample app
Custom Android certificate trust store sample app.
Sample app for the blog post at http://nelenkov.blogspot.com/2011/12/using-custom-certificate-trust-store-on.html
How to build and use:
- Download the latest Bouncy Castle provider jar to this directory.
- Edit the importcert.sh script if necessary.
- Copy a PKCS#12 file to res/raw/mykeystore.pfx.
- Copy a CA certificate in PEM format to this directory.
- Run the conversion script to create a key store file in res/raw:
$ ./importcert.sh cacert.pem
- Import the project in Eclipse.
- Edit MainActivity.java and set CLIENT_AUTH_URL and SERVER_AUTH_URL to valid URLs (e.g., on your test server).
- Build and run.