Only 44 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

javax.net.ssl.SSLException: untrusted server cert chain  RSS feed

 
sunil virup
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone.
I have recently started working on SSL.All I did was configured my Tomcat4.0 to handle SSL by generating a certificate according to its specification.
But when I try to access "Https" through an application whose source code, I have given below I get "javax.net.ssl.SSLException: untrusted server cert chain"
Exception.Can any one please help me find a solution to this problem.
The code is
public class URLReader
{
public static void main(String[] args) throws Exception
{
String inputLine;
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
URL verisign = new URL("https://localhost:8443/");
BufferedReader in = new BufferedReader(new InputStreamReader(verisign.openStream()));
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}
}
And also can any one help me to set up the Server ID that verisign gives free on trial basis on Tomcat4.0.
Expecting replies.
Bye
Sunil
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!