I was having a problem connecting jasig-cas server from my local installation.
The cas server was in https, with a self signed certificate. My local application is in http mode running on maven.
Now I dont have the admin previliges to add the certificate to the java’s cacerts file as trusted file. So my application was failing.
The cas server was in https, with a self signed certificate. My local application is in http mode running on maven.
Now I dont have the admin previliges to add the certificate to the java’s cacerts file as trusted file. So my application was failing.
Steps.
1. Download the certificate from browser to local computer.
2. use the java keytool to create a truststore file.
“%JAVA_HOME%\bin\keytool” -import -alias tomcat -file “D:\certificates\nvscmlinq1-cas.crt” -keystore nvscmlinq1-cas.jks
NOTE: this will create the nvscmlinq1-cas.jks file which is the truststore file.
1. Download the certificate from browser to local computer.
2. use the java keytool to create a truststore file.
“%JAVA_HOME%\bin\keytool” -import -alias tomcat -file “D:\certificates\nvscmlinq1-cas.crt” -keystore nvscmlinq1-cas.jks
NOTE: this will create the nvscmlinq1-cas.jks file which is the truststore file.
3. Run the maven with command line java arguments to specify the truststore file and password.
mvn jetty:run -Djavax.net.ssl.trustStore=”D:\certificates\nvscmlinq1-cas.jks” -Djavax.net.ssl.trustStorePassword=changeit
mvn jetty:run -Djavax.net.ssl.trustStore=”D:\certificates\nvscmlinq1-cas.jks” -Djavax.net.ssl.trustStorePassword=changeit
No comments:
Post a Comment
If you like to say anything (good/bad), Please do not hesitate...