小编Jay*_*ler的帖子

signtool双重签名失败

有关尝试使用SHA1/SHA256进行双重签名时遇到的故障的问题.

我现在已经过了几年SHA256代码签名证书,但在新的一年(2016)之前,我开始使用/ FD SHA256的哈希算法是符合SHA1微软弃用.

这工作正常,但当然签名哈希不会在旧操作系统上验证.我不关心XP,但我仍然关心Vista.

我首先使用以下代码签署SHA1:

signtool sign /fd SHA1 /f "cert.pfx" /p "password" /t http://timestamp.verisign.com/scripts/timsetamp.dll "file"
Run Code Online (Sandbox Code Playgroud)

然后我尝试我的双重签名:

signtool sign /as /fd SHA256 /f "cert.pfx" /p "password" /tr http://timestamp.globalsign.com/?signature=sha2 "file"
Run Code Online (Sandbox Code Playgroud)

而signtool给了我这个:


Done Adding Additional Store
SignTool Error: An unexpected internal error has occurred.
Error information: "Error: SignerSign() failed." (-2147024846/0x80070032)

现在我可以使用单个算法(SHA1或SHA256)成功签名文件,但我无法添加第二个签名.我唯一的猜测是,因为我使用的是两种算法的SAME证书,所以不喜欢这样.我是否需要为每种算法使用不同的物理证书?

只是想知道,因为在新的一年之前,我使用SHA1算法多年来一直使用SHA256证书,并且它在所有操作系统上都经过验证.

sha1 sha256 signtool

6
推荐指数
1
解决办法
1107
查看次数

标签 统计

sha1 ×1

sha256 ×1

signtool ×1