windows - 驱动程序安装失败,因为交叉签名链不包含微软

标签 windows kernel driver code-signing

您知道为什么签名证书链中会缺少“Microsoft 代码验证根”吗?

我们最近在两个域之间移动了构建系统,不得不重新安装证书。我们发现我们有一个签名问题,其中 Microsoft 不在导致安装过程中内核驱动程序被拒绝的链中。

我们注意到我们在 certmgr 中有 2 个额外的证书:可信发布者:证书

  • 3 级公共(public)初级认证..
  • 威瑞信 3 类代码签名...

在禁用Class 3 Public Primary Certification 后,“问题”消失了,我们拥有了正确的签名链,Microsoft 处于领先地位。

我不确定 Class 3 Public Primary Certification 是如何安装的,或者我们使用它的目的是什么,我正在测试以了解我们可能面临的影响。

有没有人遇到过这种问题,他们是如何解决的?有没有办法在命令行上禁用 class-3,这样我就可以单独保留 certmgr 设置,从而降低风险?

感谢帮助

彼得

签署命令

signtool.exe sign /v /ac MSCV-VSClass3.cer /s TrustedPublisher /n "My Corp" /t http://timestamp.verisign.com/scripts/timstamp.dll mydriver.sys

签名验证 signtool 验证/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 将自动使用它。但是,这可能会导致错误的证书被用于交叉签名。

越明确越好

SignTool.exe sign/v/s trustedpublisher/ac path-to-retrieved-cert\MSCV-VSClass3.cer/n myCertName/t http://timestamp.verisign.com/scripts/timestamp.dll驱动程序文件签名

  • 验证

SignTool.exe verify/kp/v drive-file-to-check

或者如果你有目录文件

SignTool.exe verify/kp/v/c driver-cat-file.cat drive-sys-file.sys

关于windows - 驱动程序安装失败,因为交叉签名链不包含微软,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7258613/

相关文章:

windows - 如何在 Visual Studio 中嵌入命令 shell

windows - Windows 命令解释器中历史缓冲区的押韵或原因?

linux - QEMU:/bin/sh: 无法访问 tty;作业控制关闭

.net - 我需要帮助转换我的驱动程序用户界面代码

c - 禁用适配器时 NdisFSendNetBufferLists 导致 BSoD

c - 读取特定格式的字符串

c++ - 使用 dll 中的类时内存无效

c - 用于升级嵌入式设备的.bin文件

linux - 内置内核驱动还需要设备树吗?

linux - 由于缺少 Build.include 文件,Ubuntu 20.04 中的 objtool 制作失败?