I am trying to connect to REST Service that has to use self signed certificates (it's a Unify PBXs Web Services Interface). The System will regenerate it's Certificates on Software updates and unless you load a certificate into the system there will always be a self signed one. When trying to connect with ion the connection is closed because of the self signed certificate (as far as google took me...). What do i need to add to my implementation to make io accept this cert? I am using ion as follows.
Ion.with(context)
.load(...)
.asString()
.setCallback(new FutureCallback<String>() {
@Override
public void onCompleted(Exception e, String result) {
}
});
You can specify custom SSL Contexts and trust managers to use self signed certificates.
Here's an example from a unit test:
You'll need to access ion's underlying http client instance as follows:
The key is a bks key store, bouncy castle.