gpt4 book ai didi

java - Jarsigner(MIME 内容类型不是应用程序/时间戳回复)

转载 作者:搜寻专家 更新时间:2023-11-01 03:18:18 26 4
gpt4 key购买 nike

前段时间我编写了一个程序来在我们的构建过程中对 jars 进行签名。这几个月没有任何问题。

现在 jarsigner 输出(没有改变任何东西!):

jarsigner: unable to sign jar: 
java.io.IOException: MIME Content-Type is not application/timestamp-reply

jar 不再签名。

问题是什么?我需要做什么才能让 jarsigner 重新工作?

我正在使用这个时间戳服务器:
<强> http://timestamp.comodoca.com

和这个 Java 版本:
Linux 上的 Java HotSpot(TM) 64 位服务器虚拟机“1.8.0_101”

这是我的确切命令行(过去几个月一直有效!):
jarsigner -storetype pkcs12 -keystore certificate_file.p12 -storepass mypassword -tsa http://timestamp.comodoca.com myjarfile.jar myalias

最佳答案

我遇到了同样的问题。我认为今天 Comodo 的时间戳服务发生了一些变化。 http://timestamp.comodoca.com 的响应状态目前HTTP/1.1 302 临时移动内容类型:文本/html

这会导致 jarsigner 出现问题,因为它期望内容类型为 application/timestamp-reply

您应该联系 Comodo 支持 https://support.comodo.com/index.php?/Knowledgebase/Article/View/68/0/time-stamping-server

关于java - Jarsigner(MIME 内容类型不是应用程序/时间戳回复),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39977930/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com