How can I access user-installed keys and certificates from my Android app?

I am struggling to use user-installed CA certificates to authenticate from the p12 file on the SD card. Certificates and keys are installed using a secure credential store (location and security> install from SD card).

I did not find documentation indicating the location if keys and certificates were imported. I tried to create an instance of TrustManagerFactory with no luck, it just contained all the pre-installed SSL certificates.

Creating a KeyStore with default options also does not work. Any suggestions would be much appreciated!

+3
source share
1 answer

Take a look at JavaMail Crypto and Bouncy Castle combos.

They allow you to import a p12 file using a file input stream and let you handle it accordingly.

It can be hard to install, and if you're upset, there is a 30-day free trial with Chilkat , designed specifically for the android, which I can confirm, works great.

0
source

Source: https://habr.com/ru/post/1758282/


All Articles