I have to implement a call to a service that is protected with a client certificate. I'm able to upload the certificate in the Modeler under Project > Settings > Certificates and in the Mendix Cloud under Project > Deploy > Environment details > Network > Certificates for outgoing connections.
My question is how to access the certificates uploaded there from Java?
I'm setting up a connection with the help of SSLContext and HttpsURLConnection.setDefaultSSLSocketFactory(). I have to provide a KeyManager[] to SSLContext.init(). When i hard code this in the app it works.
However i don't like storing the certificates with the code/model. So i hope that anybody has an idea how to access the certificates from java?
I have seen the List<String> getClientCertificatePasswords() and List<InputStream> getClientCertificates() methods, but i can't seem to put them to use.
.