当我尝试像下面这样在 jar 中自行签名时。
jarsigner -keystore my keystore myjar.jar myalias
它给出如下警告:
No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2014-05-08) or after any future revocation date.
请帮助解决问题。
最佳答案
最近的 Java 7 提供了一个(礼貌?)警告,警告已经存在了十年...
可信时间戳是在 Java 5 (2004) 中引入的。这样做的动机是,当证书过期时,开发人员不会被迫“每年重新签署部署的 JAR 文件”。
→ http://docs.oracle.com/javase/1.5.0/docs/guide/security/time-of-signing.html
基于 URL 的时间戳授权 (TSA) 通常由颁发证书授权 (CA) 提供使用与 CA 颁发的相同证书。例如,digicert tsa url 可以如下访问:
jarsigner -tsa http://timestamp.digicert.com [.. 其他选项]
→ http://www.digicert.com/code-signing/java-code-signing-guide.htm
使用自签名证书的时间戳可能是一个难以实现的目标,因为 (1) TSA 时间戳需要是可信的公平交易(排除“自时间戳”),并且 ( 2) 典型的 TSA URL 设置为使用同一 CA 组织提供的证书(即 TSA URL 不处理自签名证书)
更新:
为自签名证书添加时间戳的 URL:
- 赛门铁克:
-tsa http://sha256timestamp.ws.symantec.com/sha256/timestamp
(根据 brad-turek 的评论)
对于专用网络,可以考虑使用内部时间戳授权,例如 Thales (nCipher) 时间戳服务器(或历史上的 OpenTSA)
关于java - -tsa 或 -tsacert 时间戳,用于 applet jar 自签名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21695520/