Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
kinderlykid
kinderlykid
22 Posts
ACCEPTED ANSWER

Pinned topic SSL Handshake Exception

‏2009-02-13T04:47:22Z |
We are trying to connect to a payment gateway provider and the provider has given us an url (https://provider's url), test account and password.

We are using the below code to connect to their url from within a standalone java program.

1.URL url = new URL("https://provider's url");
2.URLConnection connection = url.openConnection();
3.connection.setDoOutput(true);
4.connection.setUseCaches(false);
5.System.out.println("Got the connection object : "+connection);
6.DataOutputStream out = new DataOutputStream( connection.getOutputStream() );
7.out.write(sb.toString().getBytes());
8.out.flush();
9.out.close();

The above java program works fine when we run it from a command prompt, However when we try to put the same java program into a web application in RAD 7.0 and run / call the corresponding method when user clicks submit button in a browser it gives the following error.

“javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: No trusted certificate found”

Our web application runs on “IBM websphere application server” and we have “IBM Http Server” as our web server.

Any help will be highly appreciated.

Thanks