带有证书的signtool存储在本地计算机中

sun*_*own 9 code-signing certificate signtool

我不能让signtool找到我的证书.pfx文件适用于签​​名,我通过直接指定pfx文件和密码来检查它.但由于其他人可以访问代码库,我真的不想在那里存储证书+密码.

这就是我在"受信任的根证书颁发机构"中在构建服务器(作为本地计算机,而不是每个用户)上安装pfx(来自symantec)的原因.这是因为Jenkins是使用本地系统帐户启动的.

这就是我现在正在尝试的:

signtool sign /v /sm /s Root /n <thename> /t http://timestamp.digicert.com <thefile>
Run Code Online (Sandbox Code Playgroud)

/ sm/s Root - 这应该告诉signtool切换到"本地机器"商店,对吗?和Root应该指定"受信任的根证书颁发机构"?

/ n - 这里我使用证书中的"颁发给"值,即公司名称.

我遇到了以下错误:

"SignTool Error: No certificates were found that met all the given criteria."
Run Code Online (Sandbox Code Playgroud)

今天我已经浏览了这么多链接,试图找出我做错了什么.我已经使用mmc检查了本地计算机上的证书,并且证书已在"受信任的根证书颁发机构"中重新启动.

pep*_*epo 6

试试这个命令:

signtool sign /v /sm /s My /n <thename> /t http://timestamp.digicert.com <thefile>
Run Code Online (Sandbox Code Playgroud)

您最好使用/sm选项,但是当您添加时,/s Root您说signtool应该在计算机商店但在Root权限中查找.您也可以跳过/s参数,因为/s My它是默认值.

有关更多信息,请参阅signtool的文档.