您知道为什么签名证书链中缺少"Microsoft代码验证根"吗?
我们最近在两个域之间移动了一个构建系统,不得不重新安装证书。我们发现我们有一个签名问题,微软不在链中,导致内核驱动程序在安装过程中被拒绝。
我们注意到我们在certmgr中有两个额外的证书:Trusted Publisher: Certificates
- 三级公共初级认证…
- Verisign Class 3代码签名…
禁用Class 3 Public Primary Certification后,"问题"消失了,我们有了Microsoft在上面的正确签名链。
我不确定Class 3 Public Primary Certification是如何安装的,或者我们是如何使用它的,我正在测试,看看我们可能面临的影响。
有人遇到过这种问题吗?他们是如何处理的?是否有一种方法可以在命令行中禁用class-3,以便我可以单独保留certmgr设置,从而降低风险?
Thanks for the help
彼得签署命令
signtool.exe sign /v /ac MSCV-VSClass3.cer /s TrustedPublisher /n "My Corp" /t http://timestamp.verisign.com/scripts/timstamp.dll mydriver.sys
标志验证Signtool verify/kp/v mydriver.sys
*** Signing Certificate Chain:
*** Issued to: Class 3 Public Primary Certification Authority
*** Issued by: Class 3 Public Primary Certification Authority
*** Expires: 8/2/2028 7:59:59 PM
*** SHA1 hash: xxxxxxxxxxxxxxxxxx
Issued to: VeriSign Class 3 Code Signing 2009-2 CA
Issued by: Class 3 Public Primary Certification Authority
Expires: 5/20/2019 7:59:59 PM
SHA1 hash: xxxxxxxxxxxxxxxxxx
Issued to: My Corp
Issued by: VeriSign Class 3 Code Signing 2009-2 CA
Expires: 9/10/2013 8:59:59 PM
SHA1 hash: xxxxxxxxxxxxxxxxxx
理论上,我可以将与我的证书匹配的verisign的交叉签名证书安装到证书存储中,signtool将自动使用它。但是,这可能导致使用错误的证书进行交叉签名。
显式更好
- 在trustedpublisher store中为通过certmgr.msc签名的用户安装我的证书
- 为您的证书获取正确的证书(https://knowledge.verisign.com/support/code-signing-support/index?page=content&actp=CROSSLINK&id=SO5820)
- 签名 时要明确
SignTool.exe sign /v /s trustedpublisher /ac path-to-retrieved-certMSCV-VSClass3.cer /n myCertName /t http://timestamp.verisign.com/scripts/timestamp.dll driver-file-to-sign
- 验证
SignTool.exe verify /kp /v drive-file-to-check
或者如果您有目录文件
SignTool.exe verify /kp /v /c driver-cat-file.cat drive-sys-file.sys
我们比较了两个构建系统,在坏系统的certmgr可信发布者列表中发现了一个额外的class 3 Public Primary证书。这与我们连锁店的最高级别相匹配。我们禁用了此发布,并将链的顶部恢复到microsoft。
所以,我们仍然有问题,但这似乎已经解决了我们的问题,没有对其他构建产生不良影响。