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

    在使用數字證書給驅動cat包簽名時遇到提示錯誤:

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

檢查pfx證書已經安裝,cer證書文件也存在,聯網也正常,但是總是提示這個錯誤。

簽名語句爲:

signtool.exe sign /s root /n "Test Certificate" /t http://timestamp.verisign.com/scripts/timestamp.dll *.cat

進一步對比分析,通過制定文件名方式簽名,是正常可以簽名成功的。

於是採用如下步驟重新安裝證書,

雙擊.pfx證書,在證書存儲目錄選項中,選擇“受信任的根證書頒發機構”,

wKioL1aV46KjziOtAABfKvRFEOY614.png

然後再重新簽名,一切正常。

原因分析:

  1. 安裝證書時默認選擇路徑和簽名時配置的路徑不一致,導致在root路徑下找不到對應證書

解決方法:

  1. 重新安裝證書,選擇存放路徑爲“受信任的根證書頒發機構”

  2. 用指定文件名方式進行簽名,如下

signtool.exe sign /f xxx.pfx /n "Test Certificate" /t http://timestamp.verisign.com/scripts/timestamp.dll *.cat

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章