someone said:
How can I bypass the "unknown certificate" exception? Is there a way to
define the certificate locally so that client recognizes it?
There are a number of ways to handle this. If it's acceptable, you can
install the certificate locally on the client using the keytool utility.
See the docs for keytool; there are gazillions of options on how to do
it.
If that's not an acceptable method (because you don't have access to the
clients), then you can modify the code by creating a new socket factory.
You would do this by getting an SSLContext, calling SSLContext.init with
a different set of trust or key managers, and then calling its
getSocketFactory method. You could then specify that new socket factory
to create SSL sockets.
--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation