Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Please help: SSL: URLReader: Works sometimes
The following code works when ran as:
java -Dhttps.proxyHost=myproxyHost.com -Dhttps.proxyPort=8080
URLReader

public class URLReader {
public static void main(String[] args) throws Exception {
String authentication = "Basic " + new
sun.misc.BASE64Encoder().encode("myid:mypassword".getBytes());

URL verisign = new URL("https://www.thawte.com");
HttpURLConnection con = (HttpURLConnection)
verisign.openConnection();
con.setRequestProperty("Proxy-Authorization", authentication);

BufferedReader in = new BufferedReader(
new InputStreamReader(
con.getInputStream()));
String inputLine;

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

in.close();
}
}


However, when I change the host to https://www.verisign.com, it gives
the following exception:
Exception in thread "main" javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: No trusted certificate
found

When I turn the debug on I see the following:
keyStore is :
keyStore type is : jks
init keystore
init keymanager of type SunX509
trustStore is:  D:\Sun\AppServer\jdk\jre\lib\security\ca
certs
trustStore type is : jks
init truststore

How can I add a verisign certificate to the key store that will make
the program work?

Thank You..

Report this thread to moderator Post Follow-up to this message
Old Post
Xavier
03-20-04 01:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Security archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 12:55 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.