Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

sun.security.validator.ValidatorException: PKIX path validation failed

843811Jun 14 2008 — edited Jun 16 2008
I wrote below program to access content of secure site https://solar.mkcl.org. but this is showing me exception
"*javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: subject/issuer name chaining check failed"*

Code is:
import java.net.URL;
import java.io.*;
import javax.net.ssl.HttpsURLConnection;

public class Test1
{
public static void main(String[] args)
throws Exception
{
String httpsURL = "https://solar.mkcl.org" ;

URL myurl = new URL(httpsURL);
HttpsURLConnection con = (HttpsURLConnection)myurl.openConnection();
InputStream ins = con.getInputStream();
InputStreamReader isr=new InputStreamReader(ins);
BufferedReader in =new BufferedReader(isr);
String inputLine;

while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);

in.close();
}
}

This program is not working for https:solar.mkcl.org & i need to solve this problem
can any one help me?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 14 2008
Added on Jun 14 2008
4 comments
458 views