我使用JDK1.6.0_131来签署一个带有SHA-256的Jar文件,如下所示。
jarsigner -sigalg SHA256withRSA -digestalg SHA-256 -tsadigestalg SHA-256 -tsa http://sha256timestamp.ws.symantec.com/sha256/timestamp -keystore mykeystore MyApplet.jar cert
显示的错误信息是:
jarsigner:无法签名jar:sun.security.pkcs.ParsingException:无法解析编码的字节
使用JDK1.7或JDK1.8时没有这样的问题。导致此错误的最可能原因是什么?感谢。
SK
答案 0 :(得分:2)
我有同样的问题,根据这个: https://knowledge.symantec.com/support/code-signing-support/index?page=content&id=SO15502
我不得不使用传统的sha1: 注意:对于传统的SHA-1时间戳,请使用SHA-1 RFC 3161时间戳网址:http://sha1timestamp.ws.symantec.com/sha1/timestamp
用1.6签署这个罐子。