Since which java version SHA-256 and SHA256withRSA are supported for timestamp at signed jar files

情到浓时终转凉″ 提交于 2019-12-05 09:29:13

Java version below 1.7.0_76 not supporting SHA-256 for timestamping caused by https://bugs.openjdk.java.net/browse/JDK-8049480 (The fix included in 1.7.0_76 http://www.oracle.com/technetwork/java/javase/2col/7u76-bugfixes-2389098.html)

From "Oracle JRE and JDK Cryptographic Roadmap", SHA-1 still not be planned to disable on code signing.

So I think the best choice (to support old Java version) for now is using SHA-1 as Timestamping algorithm. (Use below 8u101, 7u111 for signing OR Use the -tsadigestalg option on 8u101, 7u111 or above)

I have tested jar file signed with

Digest algorithm: SHA-256
Signature algorithm: SHA256withRSA, 2048-bit key
Timestamp digest algorithm: SHA-1
Timestamp signature algorithm: SHA1withRSA, 2048-bit key

work fine with Java 7, 8, 9(ea+174)

One solution would be to just not time-stamp the jar file. Waiting for some better recommendation...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!