3

我在 HTTP Server 中部署了一个 Swing 应用程序。用户使用浏览器指向一个 URL 并使用 java webstart 安装客户端。现在我需要启用对部署在 HTTP 服务器上的应用程序的 https 访问。我使用 JDK 1.5 作为 jnlp 文件中支持的默认 jdk。暂时我使用自签名证书对 jar 进行签名(默认情况下使用 Sun 的 jarsigner、keytool 等工具创建)。

解决方案/步骤将不胜感激。

提前致谢

拉梅什

4

3 回答 3

2

You need to enable HTTPS on the web server. To get the certificate you need to provide credentials and the host name of the server to a certificate authority (CA) like VeriSign or Thawte. They can provide you with a server certificate signed by their root certificate or some intermediate certificate. This certificate must then be imported into the web server to enable HTTPS over SSL. The web clients, like a browser or webstart will then verify the certificate chain when accessing the server.

If you use a self signed jar, all your users will be presented with a warning message about potentially unsafe code. To avoid this you should get a code signing certificate from a CA, which would be somewhat similar to the web server certificate. This CA-provided certificate can be imported into the keystore and used in the same way you use the self signed certificate. The code signing certificate will be signed by the CA so that the certificate chain can be verified by webstart.

于 2008-12-04T21:35:00.187 回答
2

据我了解您的问题,您不需要对客户端代码进行任何更改。如果您只想通过 HTTPS 访问 JNLP,您只需要重新配置分发 JNLP 的应用程序服务器,或者如果您在应用程序服务器前面有一个网络服务器(就像我们在这里所做的那样:用户 - https -> apache -> AJP -> tomcat)您需要重新配置网络服务器以允许通过 HTTPS 访问 JNLP。

于 2008-11-07T07:16:01.760 回答
0

您希望利用的 https 功能是什么?

  • 签名/服务器身份验证是通过代码签名完成的,尽管您使用自签名证书破坏了这一点。
  • 您的应用程序代码是否包含必须对窃听者隐藏的秘密?

正如您所说,您“需要启用”必须有一个潜在的原因。

我相信在您“需要 https”之前,您需要一个适当的代码签名证书。您可能想重新表述您的问题,以便可以解决您的潜在问题而不是非常具体的问题。

于 2008-11-06T19:12:04.703 回答