When CA SDM Tomcat is configured with SSL, the SSL certificate comes into play when a custom Java program needs to access the CA SDM Tomcat layer.
This document provides steps or a methodology on how to import the SSL certificate for the Java program to function properly.
Usually an error similar to the one below appears when the SSL certificate is not read properly or is not in the Java keystore that is being used by the Java program:
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
exception = javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: s
un.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Service Desk Manager 14.1 and higher versions
REM set JAVA env
SET JAVA_HOME=C:\jre
ECHO "JAVA_HOME: %JAVA_HOME%"
SET PATH=%PATH%;%JAVA_HOME%\bin
echo "************************"
echo "when prompted for password, provide a password. changeit is the default password <and hit enter>"
echo " when prompted for Trust this certificate? type: yes <and hit enter>"
echo "************************"
keytool -importcert -file c:\JRE\CA_SDM_Tomcat_CertFile.cer -keystore C:\JRE\.keystore
echo "************************"
echo "now verifying the keystore again"
echo "when prompted for password, provide a password. changeit is the default password <and hit enter>"
echo "************************"
keytool -list -keystore c:\JRE\.keystore
pause
java -Djavax.net.ssl.trustStore=c:\JRE\.keystore -Djavax.net.ssl.trustStorePassword=changeit -jar MyJavaProgram.jar