I have some code on Android that makes use of URL.openStream. For internal test purposes I need to be able to point it to a server that uses a private CA. We already have our CA bundles in PEM format (as we're also using libcurl from NDK), and would like to be able to just read the PEM files directly into whatever KeyStore (or similar) that URL.openStream uses.
So this question is a multi-part thing:
- How do you get the key storage used by URL.openStream? Or should I just be using HttpClient directly?
- How do you add a PEM certificate to said key storage? (even if using HttpClient)
Thanks.