You should be able to upload client certificates in the Mendix cloud, as described here.
You can retrieve certificates in Java by:
Core.getConfiguration().getClientCertificates();
Similarly, you can get their passwords by:
Core.getConfiguration().getClientCertificatePasswords();
See the Java API here.