I am calling a web service which has a self-signed certificate.
I have added the certificate to my JAVA_HOME
using the following command
"%JAVA_HOME%/bin/keytool" -import -alias emoney -file C:\Users\l.young\certificates\srv03.wpay.co.crt -keystore "C:\Program Files\Java\jdk1.8.0_45\jre\lib\security\cacerts"
Following this I added the following 2 lines to my myeclipse.ini
file
-Djavax.net.ssl.trustStore=C:\Program Files\Java\jdk1.8.0_45\jre\lib\security\cacerts
-Djavax.net.ssl.trustStorePassword=changeit
And set the tomcat configuration which I have in MyEclipse to run java found under %JAVA_HOME%
and not in AppData
After completing all this I still get the following exception
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
What have I missed in my config? Why is this still failing?
EDIT - QUESTION Does the alias make a difference?
EDIT 2 Testing using SOAPUI and it works - no certificate issues. Any suggestion how to make it work in MyEclipse?