0
votes

I am running the sample of playground2 from wso2 this post, I am getting following error when I am submitting the form for Get Access Token

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

4

4 Answers

2
votes

Did you try adding the certificate of the server to java ca. Basically you need to add the certificate of the WSO2 server to the java cacerts. Bellow post explains how to add the certificate of the super tenant to java cacerts

http://isharaaruna.blogspot.com/2013/11/adding-certificate-to-java-ca.html?view=timeslide

1
votes

After googling I found solution, If any one facing with similar issue follow this steps:-

1) save this code with name InstallCert.java

2) compile and run with,

java InstallCert ipaddress:port

Here, ipaddress and port is your ipaddress and port number from where your are trying to Handshake

3) press 1 when it asked for

4) after that it'll generate some crt file, pest it under your JAVA_HOME/jre/lib/security

5) restart your server

0
votes

That exception usually means that the OAuth client doesn't trust the server's SSL certificate I assume it happens when calling the token service the get the user token, more information (full stacktrace?) could be more useful to find out what is going on.

The first thing you can try is to import the server public certificate to the client's (tomcat) truststore.

I assume you need to take the SSL certificate of the WSO2 IS server (just export it via your browser) and create an additional Tomcat trutstore (exaamples)

0
votes

You need to incert https site's ssl root certificate to cacert of jre.

I think THIS post would really help it is descriptive enough.

please make sure you are performing all actions on jre which is used by your application.