简体   繁体   English

有没有办法与Java 1.3建立HTTPS连接?

[英]Is there a way to establish a HTTPS Connection with Java 1.3?

I have to work on an old 1.3 JVM and I'm asked to create a secure connection to another server. 我必须在旧的1.3 JVM上工作,并且我被要求创建与另一台服务器的安全连接。 Unfortunately the HttpsURLConnection only appears sinc JVM 1.4. 不幸的是,HttpsURLConnection只出现了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? 是否有一个图书馆,我可以添加这个功能吗?

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. 您需要安装以前需要的Java安全套接字扩展(JSSE),因为由于喜剧导出限制,Sun不会将其与JDK一起发送。 I had a look on Sun's web site, but the JDK 1.3 instructions are preving elusive. 我查看了Sun的网站,但是JDK 1.3的说明令人难以置信。 Bear in mind that JDK 1.3 is now end-of-lifed by Sun, so they may not have any information any more. 请记住,JDK 1.3现在已经被Sun终止,因此他们可能不再拥有任何信息。

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

Check out the BouncyCastle implementation. 查看BouncyCastle实现。 It works all the way down to Java 1.1 and J2ME. 它一直工作到Java 1.1和J2ME。

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. 如果JSSE不适合你(来自@skaffman的答案,可能很难找到文档),你可能想要查看某种代理。 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. 您可以设置在同一本地计算机(或可信网络)上运行的守护程序,然后通过HTTPS将请求转发到最终结束点。 You could write this proxy server using a more modern JVM. 您可以使用更现代的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. 当然,如果您偶然控制了最终的终点,也许只需将两台服务器放在VPN上即可。

您可以使用JSSE

skaffman links to the SSL guide for jakarta commons HttpClient . skaffman链接到jakarta commons HttpClient的SSL指南。 HttpClient is a good library for dealing with http. HttpClient是一个处理http的好库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM