Android: safe/smart way to retrieve list of trusted CA?
<p>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.  </p>

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

<pre><code>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
</code></pre>
