【问题标题】:Selfsigned certificate is shown as not trusted source in signTool自签名证书在 signTool 中显示为不受信任的来源
【发布时间】:2021-11-09 09:36:08
【问题描述】:

我使用 signTool 制作自己的证书

powershell.exe New-SelfSignedCertificate -DnsName "www.mydns.me" -Type CodeSigning -NotBefore 27.10.2021 -NotAfter 27.10.2024 -CertStoreLocation "cert:\CurrentUser\My"

证书在证书管理器中可用 我用

签署了我的文件
signtool sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /a myfile.exe

我想在文件中显示证书

signtool verify /pa  myfile.exe

但它给出的来源是不可信的 SignTool 错误:已处理证书链,但在根目录中终止 信任提供者不信任的证书。

为什么在选项为/ pa时不信任证书,并且在我的证书中心提供。

【问题讨论】:

    标签: powershell signtool


    【解决方案1】:

    自签名证书是自签名并存储在您当前的用户证书Personal 存储中。 这不是因为您拥有信任它或计算机信任它的证书。 您必须在Trusted Root Certification Authorities 中导入此证书的副本。您可以将其导入用户存储或计算机存储(本地计算机上的任何用户都会信任您的自签名证书)。 通过示例使用Import-Certificate -CertStoreLocation Cert:\CurrentUser\Root -FilePath C:\cert.cer。只有public 密钥必须导入Trusted Root Certification Authorities 存储区,而不是private 密钥。

    我不知道/pa 选项。尝试不带任何选项。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-02-08
      • 1970-01-01
      • 2018-04-16
      • 2012-04-23
      • 2017-04-21
      • 2019-10-02
      • 2015-10-28
      • 2015-11-02
      相关资源
      最近更新 更多