Hi All,
I'm using Commons HttpClient API to connect to one of our Servers.
This server uses SSL and also it uses valid Certificate (issued by Verisign Trust Network).
My Browser never complains as i connect to the server. But my java program throws
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found Exception.
I still have the same issue, even if this valid certificate is imported to my java truststore.
I used the following simple code to connect to the server..
HttpClient httpclient = new HttpClient();
GetMethod httpget = new GetMethod("https://www.ourserver.com/");
try {
httpclient.executeMethod(httpget);
System.out.println(httpget.getStatusLine());
} finally {
httpget.releaseConnection();
}
Note: I'm very sure that our server is using Trusted certificate as my browser never complained.
Thank you.