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 ?? TIA
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 ?? TIA