【问题标题】:Signtool using output from debug optionSigntool 使用调试选项的输出
【发布时间】:2016-11-30 06:02:19
【问题描述】:

我正在使用SignTool 和数字证书来签署 dll。

签名 dll 是我构建过程的一个步骤。我使用 msbuild 构建我的应用程序,因此它是 Target 之一,并使用 Exec Command 对 dll 进行如下签名 -

<Exec Command = "signtool sign /a /v /sha1 $(SHA1) $(binPath)\app.exe" />
where $(SHA) is the hash of the certificate 
$(binPath) is the path of the binaries

现在这不会签署 dll 并给我一个错误说明

SignTool Error: No certificates were found that met all the given criteria.

我根据这个post尝试了debug选项

我得到了以下输出

21:00:06,920 INFO  - The following certificates were considered:
21:00:06,923 INFO  - Issued to: <Issued to company name>
21:00:06,923 INFO  -
21:00:06,923 INFO  - Issued by: <Issued by company name>
21:00:06,923 INFO  -
21:00:06,924 INFO  - Expires: Mon Nov 28 05:29:59 2016
21:00:06,924 INFO  -
21:00:06,924 INFO  - SHA1 hash: D5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxDA
21:00:06,924 INFO  -
21:00:06,924 INFO  -
21:00:06,924 INFO  - Issued to: <Issued to company name>
21:00:06,924 INFO  -
21:00:06,924 INFO  - Issued by: <Issued by company name>
21:00:06,924 INFO  -
21:00:06,924 INFO  - Expires: Sun Dec 10 05:29:59 2023
21:00:06,924 INFO  -
21:00:06,924 INFO  - SHA1 hash: D0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxBC
21:00:06,924 INFO  -
21:00:06,924 INFO  -
21:00:06,925 INFO  - Issued to: <Issued to company name>
21:00:06,925 INFO  -
21:00:06,925 INFO  - Issued by: <Issued by company name>
21:00:06,925 INFO  -
21:00:06,925 INFO  - Expires: Thu Jul 17 05:29:59 2036
21:00:06,925 INFO  -
21:00:06,925 INFO  - SHA1 hash: 91xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx81
21:00:06,925 INFO  -
21:00:06,925 INFO  -
21:00:06,925 INFO  - After EKU filter, 3 certs were left.
21:00:06,925 INFO  - After expiry filter, 2 certs were left.
21:00:06,925 INFO  - After Hash filter, 0 certs were left.
21:00:06,925 INFO  - After Private Key filter, 0 certs were left.
21:00:06,925 INFO  - SignTool Error: No certificates were found that met all the given criteria.

得到这个输出后,我不知道应该如何进行。

不过还有一个观察结果,

SignTool 通过命令提示符运行 dll 时成功签名。

现在这件事让我发疯了。

请求帮助。

【问题讨论】:

  • 你传入的是哪个 SHA1 哈希值?您确实意识到该列表中的第一个证书已于昨天到期。
  • @selbie:我使用的 SHA1 具有我们获得的新证书的价值,是的,我确实意识到它确实过期了,这是有效的。

标签: windows digital-signature signtool


【解决方案1】:

我发现了问题,快速构建服务器是使用不同于我用来登录它的帐户启动的。

因此,数字证书与我用来登录构建计算机的帐户一起安装。

现在由于 QuickBuild 使用不同的帐户进行构建,它无法找到数字证书。

然后我使用 QuickBuild 使用的帐户登录到构建计算机并安装了数字证书,一切都开始工作了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-08-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多