PDA

View Full Version : javax.net.ssl.SSLHandshakeException



shaikbaji.forums@gmail.co
Jun 30th, 2012, 02:29 PM
Hi,

I have configured the CAS server and created two simple test web applications. I want to implement Single Sign On(SSO) for these two test web apps. Without SSL this is working fine but after added SSL I am getting SSLHandshakeException.

As part of my implementation, I created a SSL by running the following commands:


Generate KeyStore: keytool -genkey -alias tomcat -keyalg RSA -validity 365
Export Certificate form keystore: keytool -export -alias tomcat -file server.crt
Importing the certificate into jvms: C:\Program Files\Java\jdk1.6.0_04\jre\lib\security>keytool -import -alias tomcat -file %USER_HOME%//server.crt -keystore cacerts -storepass changeit


Then I enabled the 8443 port in server.xml file of my tomcat5.5 and restarted.

When I am browsing directly to the htts://localhost:8443/cas/login its working fine but when I am redirecting from my test web apps to CAS only I am getting the following exception that to after clicking on login button even the login is successful and TGT is created.

java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderE xception: unable to find valid certification path to requested target

NOTE: I tried with InstallCert.java also but no use.

Kinldy do the needful help.

Regards,
BSK

Rob Winch
Jul 1st, 2012, 12:18 PM
See if the CAS SSL Troubleshooting and Reference Guide (https://wiki.jasig.org/display/CASUM/SSL+Troubleshooting+and+Reference+Guide)

shaikbaji.forums@gmail.co
Jul 2nd, 2012, 01:10 AM
HI Rob,

Thanks for your quick reply. I will try and get back to you.

NOTE: what I am assuming is this issue is occurring in between of Test Apps and CAS server not in between browser(client) and CAS server

Regards,
BSK