I am using the below code to retrieve this list. It seems to work,
however it doesn't seem particularly safe/smart because I can't find
any documentation that indicates the .bks file will always be
available at the hard coded location.

Is this method reasonable, or is there a safer/smarter way to go about
this?

String filename = "/system/etc/security/cacerts.bks";

FileInputStream is = new FileInputStream(filename);
KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType());
String password = "changeit";
keystore.load(is, password.toCharArray());

PKIXParameters params = new PKIXParameters(keystore);

Iterator it = params.getTrustAnchors().iterator();
//iterate and such

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to