dimanche 29 mars 2015

Spring Framework - SSL Issues

I am using spring framework for my application on RHEL 6 and making calls over https. However, this fails with the following error.



InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty; nested exception is javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty"


I believe this has to do with truststores being empty so I have created a new truststore and added a self signed CA cert to it. However, the application doesn't seem to pick up the JAVA_OPT that I am exporting. I also tried MAVEN_OPTS but no luck their either.



-Djavax.net.debug=all -Djavax.net.ssl.trustStore=/tools/java/jdk1.7.0_67/jre/lib/security/XXXXXX -Djavax.net.ssl.trustStorePassword=XXXXXX


Is this a known issue with spring framework? Or is there another way that I should be passing these options to the application externally? Or is setting a system.properties the only way?


Aucun commentaire:

Enregistrer un commentaire