What is the difference between the Java 1.6 and 1.7 jarsigner

╄→гoц情女王★ 提交于 2019-12-03 01:51:33

This is because the default digest algorithm for Java 1.7 is SHA-256 while for Java 1.6 it's SHA1withDSA.

Java 1.6 Jarsigner docs

Java 1.7 Jarsigner docs

Yes you CAN use 1.7!

It is very tricky to find info on the usage with 1.7, but once found it is reasonable simple:

For keytool include

-sigalg SHA1withDSA -keyalg DSA -keysize 1024

For jarsigner include

-sigalg SHA1withDSA -digestalg SHA1

(1024 is the maximum and works, less might do the trick)

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