JSSE and Tomcat 4.1 / Sun JDK 1.4.2 - No trusted certificate found

N

Neill

I'm using Eclipse (WSAD with IBM JDK 1.3.1) for development and Tomcat 4.1
with Sun JDK 1.4.2 for deployment of a web app. I'm posting to a website
using SSL as follows:

Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
SSLSocketFactory sslFactory = (SSLSocketFactory)
SSLSocketFactory.getDefault();
SSLSocket sslSocket = (SSLSocket) sslFactory.createSocket(hostName, 443);
pw.print(hostName+": starting handshake ...");
sslSocket.startHandshake(); //exception is thrown here using JDK 1.4.2
pw.println(" completed");

and get the following error at sslSocket.startHandshake() when running in a
servlet using Tomcat with JDK 1.4.2

javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: No trusted certificate found

I then ran the same code in a main function in Eclipse, and it completed
successfully. So, I changed the runtime for Tomcat to IBM JDK 1.3.1 and it
again ran successfully with the following output:.

www.thawte.com: starting handshake ... completed
www.verisign.com: starting handshake ... completed
www.sandbox.paypal.com: starting handshake ... completed

Why am I getting an exception using JDK 1.4.2 and Tomcat ?? TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top