Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82401

How to access the certificates stored in the Modeler or in the Mendix Cloud from java

$
0
0

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.

.


Viewing all articles
Browse latest Browse all 82401

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>