Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-webdav-dev] using SSL with eclipse

A Felix <techie_rustam@xxxxxxxxx> wrote:

> can you please tell me what are the exact steps that
> I need to follow in order to use SSL with eclipse.

Well the exact code depends upon your SSL provider, the example class that
I have uses IBM's 'com.ibm.jsse' and 'com.ibm.net.ssl' packages.  You can
choose to use Sun's ref' or another provider.

However, all that is required to use your provider from WebDAV is that you
implement the socket factory interface
      org.eclipse.webdav.http.client.ISocketFactory

that interface has a single method
      public Socket createSocket(String protocol, String host, int port)
throws IOException;

so a SSL-aware factory will check for the protocol to equal "https" and
create a SSL socket, otherwise create a regular socket.

Then to install your factory just create the new HttpClient and call
      setSocketFactory(myFactory)

> Would that require to modify client code?

Nope.

> One important thing that I want to know is how much
> stable is Eclipse API?

Increasing so, however, this is not API code so is subject to ongoing
improvement.  (It hasn't changed for a long time, and I expect it will only
be maintainance fixes in the future -- but it _may_)

Regards,
Tim




Back to the top