有人在java小程序中成功使用签名时间戳吗?

发布于 2024-07-12 04:23:27 字数 626 浏览 6 评论 0原文

Java 1.5 添加了增强支持签名时间戳。 据我所知,这个想法是,只要文件在证书有效时进行签名,签名的 jar 文件就不应该仅仅因为代码签名证书已过期而变得无效。 从理论上讲,这意味着我们不必每年在证书过期时重新签名和重新部署我们的应用程序。 不幸的是,基于这两个论坛主题,实施中似乎存在问题:

http:// /forums.sun.com/thread.jspa?threadID=744677
http://forums.sun.com/thread.jspa?threadID=5309004

我正要开始测试这个,但我想知道是否有人成功地做到了这一点,无需在客户端上导入时间戳证书(这会破坏整个目的)?

Java 1.5 added an enhancement to support signature timestamps. The idea, as far as I can tell, is that signed jar files should not become invalid just because the code signing certificate has expired, as long as the files were signed while the certificate was valid. In theory, this means we do not have to re-sign and redeploy our applications every year when the certificate expires. Unfortunately, there seem to be problems in the implementation, based on these two forum threads:

http://forums.sun.com/thread.jspa?threadID=744677
http://forums.sun.com/thread.jspa?threadID=5309004

I'm about to begin testing this, but I was wondering if anyone has successfully done this, without having to import the timestamping certificate on the client (which would defeat the whole purpose)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

假装不在乎 2024-07-19 04:23:27

Thawte TSA 根证书已添加到 6u10 和 5.0u18 中的 Sun JRE cacerts 文件中。

The Thawte TSA root certificate was added to Sun's JRE cacerts file in 6u10 and 5.0u18.

向地狱狂奔 2024-07-19 04:23:27

不幸的是,这个功能目前看来完全没有价值。 在签署 jar 文件时添加时间戳很容易,只需将此参数添加到 jarsigner 命令中即可:

-tsa https://timestamp.geotrust.com/tsa

这是 Thawte 时间戳服务器的 URL。 不幸的是,Thawte 时间戳 CA 证书未包含在 Java 运行时的受信任 CA 证书列表中,因此它实际上毫无意义。 也就是说,如果您在代码签名证书过期后加载小程序,您将看到“不受信任”警告对话框,而不是“受信任”警告对话框。

有一种“解决方法”,发布于此处,但它的工作原理是嵌入 Thawte在小程序本身中添加 CA 证书时间戳,并在客户端上运行 keytool 来导入证书。 但我不知道这是如何工作的,因为在该代码运行之前用户已经看到了签名的代码对话框。

我会继续寻找解决方案,但我不抱希望。 我无法想象为什么这么长时间之后 Java 运行时还没有包含可用的时间戳 CA 证书。

Unfortunately, this feature appears to be completely worthless at this time. It is easy to add a timestamp when signing a jar file, just add this parameter to the jarsigner command:

-tsa https://timestamp.geotrust.com/tsa

This is the URL to Thawte's timestamping server. Unfortunately, the Thawte timestamping CA cert is not included in the Java runtime's list of trusted CA certs, so it is effectively meaningless. That is, if you load the applet after the code signing certificate has expired, you get the "untrusted" warning dialog instead of the "trusted" one.

There is a "workaround", of sorts, posted here, but it works by embedding the Thawte timestamping CA cert in the applet itself, and running keytool on the client to import the cert. I can't see how this would work though, since the user will already have seen the signed code dialog before this code can run.

I'll keep looking for a solution, but I'm not hopeful. I can't imagine why a usable timestamping CA cert has not been included with the Java runtime after all this time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文