【腾讯云】云产品限时秒杀,爆款1核2G云服务器,首年99元

关于app签名——无法对 jar 进行签名: 时间戳颁发机构没有响应

这段时间,一直在尝试ionic2,打重新拾起ionic的过程中发现很多流程已经和之前的流程存在很大的差异,在签名时遇到了错误,集体错误如下:

根据网上查找资料,说关闭防火墙即可,经实验不可以。

执行的命令

jarsigner -verbose -digestalg SHA1 -sigalg MD5withRSA -tsa https://timestamp.geotrust.com/tsa -keystore happen.keystore -keypass coo -storepass coo -signedjar signed.apk platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk happen.keystore

或者
jarsigner -verbose -tsa https://timestamp.geotrust.com/tsa -keystore ****.keystore -signedjar ****.apk platforms/android/build/outputs/apk/android-release-unsigned.apk ****.keystore

执行都提示无法对 jar 进行签名: 时间戳颁发机构没有响应,在网上查找相关错误也没有发现正确的答案,于是打开时间戳地址发现时间戳地址在墙内和墙外都不能访问,于是查找相关资料发现时间戳地址已经过期,更换时间戳地址即可

相关链接:

https://stackoverflow.com/questions/43585380/is-http-timestamp-geotrust-com-tsa-not-longer-available-for-signtool

https://knowledge.symantec.com/support/partner/index?page=content&id=NEWS10071&viewlocale=en_US

打开第二个地址发现我们命令中的地址显示已经过期,测试新地址可用,替换为新地址即可。

正确命令如下

jarsigner -verbose -tsa http://sha256timestamp.ws.symantec.com/sha256/timestamp -keystore happen.keystore -signedjar happen.apk platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk happen.keys
tore

或者

jarsigner -verbose -digestalg SHA1 -sigalg MD5withRSA -tsa http://sha256timestamp.ws.symantec.com/sha256/timestamp -keystore happen.keystore -keypass 111111 -storepass 111111 -signedjar signed.apk platforms/androi
d/app/build/outputs/apk/release/app-release-unsigned.apk happen.keystore

以上为1.0时本人采用的签名方法,签名后的app可以正常使用。

下边是ionic2 document文档内的签名方法:

keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.jks android-release-unsigned.apk my-alias

官方地址

不过使用官方命令会有如下提示:

解决方法为:在命令中添加如下参数:

 -tsa http://sha256timestamp.ws.symantec.com/sha256/timestamp

posted @ 2018-01-31 09:47  happenzh  阅读(649)  评论(0编辑  收藏  举报