tags:

views:

467

answers:

5

I have to work on an old 1.3 JVM and I'm asked to create a secure connection to another server. Unfortunately the HttpsURLConnection only appears sinc JVM 1.4.

Is there another way to create a secure connection? Is there a library that I could you to add this fonctionnality?

+7  A: 

You need to install the Java Secure Socket Extension (JSSE), which used to be required because Sun wouldn't ship it with the JDK because of comedy export restrictions. I had a look on Sun's web site, but the JDK 1.3 instructions are preving elusive. Bear in mind that JDK 1.3 is now end-of-lifed by Sun, so they may not have any information any more.

http://hc.apache.org/httpclient-3.x/sslguide.html

skaffman
A: 

You might be able to use JSSE.

Oli
+2  A: 

If JSSE doesn't work out for you (from @skaffman's answer, it may be hard to find documentation), you may want to look into some sort of a proxy. You could set up a daemon running on the same local machine (or trusted network), which then forwards the requests over HTTPS to the final end point. You could write this proxy server using a more modern JVM. Your legacy system would then point to the proxy rather than the real service.

Of course, if, by chance, you also have control over the final end point, you could perhaps just put both servers on a VPN.

pkaeding
stunnel and the likes...
Alexander
A: 

skaffman links to the SSL guide for jakarta commons HttpClient. HttpClient is a good library for dealing with http.

Kyle Dyer
+1  A: 

Check out the BouncyCastle implementation. It works all the way down to Java 1.1 and J2ME.

Heath Borders