无法使用代码签名证书签署代码

时间:2012-02-22 12:36:22

标签: code-signing authenticode signtool

我们从Thawte购买了Microsoft Authenticode证书。现在我把它放在PFX文件中。我尝试以下方法:

D:\sign>signtool sign /f ./cert/cert.pfx /p mypass /t http://timestamp.verisign.com/scripts/timstamp.dll "mySetup.exe"
Done Adding Additional Store
Successfully signed and timestamped: mySetup.exe

但是当我运行mySetup.exe时,它会像无符号一样运行,并显示“Unknown Publishier”。 当我使用SignTool验证EXE文件时,我得到了以下内容。

D:\sign>SignTool verify mySetup.exe
SignTool Error: WinVerifyTrust returned error: 0x800B010A
SignTool Error: File not valid: mySetup.exe

Number of errors: 1

有什么问题?

1 个答案:

答案 0 :(得分:0)

这可能与Thawte使用中级证书进行签名有关。他们认为这是在best practices之内,我不会以某种方式争论。

然而,从最终用户的角度来看,这可能会导致并发症。这是使用ClickOnce的known issue with VSTO(Visual Studio Tools for Office)解决方案,可能会对您产生影响。

遗憾的是,处理此问题的解决方案是,您需要将适当的中级CA证书添加到所有最终用户计算机:

分辨率

此问题的解决方法是在将安装应用程序的所有最终用户计算机上包含中间证书颁发机构的证书。截至目前,该问题仅在处理Thawte证书时报告,并且要求在最终用户计算机上安装Thawte中间证书。

Thawte provides links to the appropriate CA certs for their Intermediate Certificates