Reading client certificate in a Java Action

0
Hi, I am trying to import and later read the client certificate in a MX app, I have a pfx file that is imported into App Settings > Certificates  I try to load it via this call  InputStream certificate = Core.getConfiguration().getClientCertificates().get(0); I get the InputStream which I think is for the file that I already imported into the app in Mx Studio Pro > App Settings, but this line Core.getConfiguration().getClientCertificatePasswords().get(0) returns a wrong password and also the certificate is not validated by the 3rd party that is supposed to accept it. I don’t know what’s wrong that I get the wrong certificate and the wrong password. Core.getConfiguration().getClientCertificates() returns only one InputStream.  
asked
1 answers
0

Problem fixed!

The code and configuration were all correct, one necessary piece of info to know is that Mendix changes the certificate file's password while importing them, so 

Core.getConfiguration().getClientCertificatePasswords().get(0)

returns a password that is not the same as the password you used to create the certificate, knowing this lead to solving the problem.

answered