Re: HTTPS client throws "javax.net.ssl.SSLHandshakeException: unknown certificate"
From: someone (someone_at_somewhere.com)
Date: 02/29/04
- Next message: Ryan Stewart: "Re: Deprecated hide and show for Choice"
- Previous message: Rasmus Nielsen: "Re: S.O.S!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 28 Feb 2004 23:51:59 GMT
Chris Smith wrote:
> someone wrote:
>
>>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.
By client, do you mean the local host or the HTTPS client class itself?
>
> 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.
Could you give me more details on that approach, please?
- Next message: Ryan Stewart: "Re: Deprecated hide and show for Choice"
- Previous message: Rasmus Nielsen: "Re: S.O.S!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|