代码签名证书可用于对Windows程序开发的代码或内容进行数字签名。收到受信任的证书并保存PFX(.p12)文件后,请按照以下说明指导您在运行Windows SDK 7.0或更高版本的Windows Vista计算机上完成签名过程。如果您正在运行Windows SDK 6.0或更低版本,请参考我们的《Microsoft Authenticode安装说明》以使用GUI界面。
点击开始菜单
运行cmd.exe
对于Symantec&Thawte证书,请运行以下命令:
SignTool sign /f "path to your PFX file" /p "your PFX file password" /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td "path to the exe file you want to sign"
对于Comodo证书,请运行以下命令:
SignTool sign /f "path to your PFX file" /p "your PFX file password" /tr http://timestamp.comodoca.com /td "path to the exe file you want to sign"
恭喜你!您的.exe文件已成功签名。
我们强烈建议您通过运行以下命令来验证您的签名:signtool verify /pa /v“您所签名的exe文件的路径”。如果您没有使用时间戳功能,我们强烈建议您阅读我们的文章,为任何代码添加时间戳的重要性,以确保签名在证书到期后仍然有效。