- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我需要使用company.pfx中存储的证书签署Application.exe文件。所以,我使用了signtool:
signtool.exe sign /p password /f company.pfx /t http://timestamp.verisign.com/scripts/timestamp.dll /v Application.exe
The following certificate was selected:
Issued to: Company, Inc.
Issued by: Thawte Code Signing CA - G2
Expires: Wed Aug 27 02:59:59 2014
SHA1 hash: A2A0BD7C4516BF8C88AECC3A568CE9BB5D63902D
Done Adding Additional Store
Successfully signed and timestamped: App1_old.exe
Number of files successfully Signed: 1
Number of warnings: 0
Number of errors: 0
signtool 表示没有错误。但在数字签名详细信息中,有一条消息“签名中的证书无法验证。”并且没有证书路径。
在详细信息中,有一个属性“扩展错误信息”,表示“吊销状态:吊销功能无法检查吊销,因为吊销服务器已离线。”
为了调查这个问题,我在应用程序上使用了 sigcheck(-a key ),它显示“已验证:无法为受信任的根颁发机构构建证书链。”
然后我将 pfx 文件导入到存储库中,看起来证书没问题。
我在 stackoverflow 上搜索了有关我的主题的信息,并找到了一些链接,这很有帮助。
How to create PFX with my chain of certificates?
How can I sign an ActiveX control with a code signing certificate and be a verified publisher?
解决方案是从 pfx 中提取证书(使用 OpenSSL)并使用/ac 参数应用它
openssl pkcs12 -in company.pfx -out company_cl.pem -nodes -clcerts
openssl x509 -in company_cl.pem -out company_cl.cer -outform DER
signtool sign /ac company_cl.cer /p password /f company.pfx /t http://timestamp.verisign.com/scripts/timstamp.dll /v Application.exe
The following certificate was selected:
Issued to: Company, Inc.
Issued by: Thawte Code Signing CA - G2
Expires: Wed Aug 27 02:59:59 2014
SHA1 hash: A2A0BD7C4516BF8C88AECC3A568CE9BB5D63902D
Cross certificate chain (using machine store):
Issued to: thawte Primary Root CA
Issued by: thawte Primary Root CA
Expires: Thu Jul 17 02:59:59 2036
SHA1 hash: 91C6D6EE3E8AC86384E548C299295C756C817B81
Issued to: Thawte Code Signing CA - G2
Issued by: thawte Primary Root CA
Expires: Sat Feb 08 02:59:59 2020
SHA1 hash: 808D62642B7D1C4A9A83FD667F7A2A9D243FB1C7
Issued to: Company, Inc.
Issued by: Thawte Code Signing CA - G2
Expires: Wed Aug 27 02:59:59 2014
SHA1 hash: A2A0BD7C4516BF8C88AECC3A568CE9BB5D63902D
Done Adding Additional Store
Successfully signed and timestamped: Application.exe
Number of files successfully Signed: 1
Number of warnings: 0
Number of errors: 0
现在“数字安全详细信息”中的消息是“数字签名正常。”
但我不明白为什么我需要使用/ac 参数。有人有什么想法吗?
<小时/>已编辑。
我已经使用 Application.exe 验证了应用程序的第一个版本(不带/ac),它为我提供了更多信息:
signtool.exe verify /v /kp Application.exe
Verifying: Application.exe
Hash of file (sha1): 5CBB228F4F206C65AAC829ACF40C297F291FE0A7
Signing Certificate Chain:
Issued to: Company, Inc.
Issued by: Thawte Code Signing CA - G2
Expires: Wed Aug 27 02:59:59 2014
SHA1 hash: A2A0BD7C4516BF8C88AECC3A568CE9BB5D63902D
The signature is timestamped: Fri Mar 29 18:42:56 2013
Timestamp Verified by:
Issued to: Thawte Timestamping CA
Issued by: Thawte Timestamping CA
Expires: Fri Jan 01 02:59:59 2021
SHA1 hash: BE36A4562FB2EE05DBB3D32323ADF445084ED656
Issued to: Symantec Time Stamping Services CA - G2
Issued by: Thawte Timestamping CA
Expires: Thu Dec 31 02:59:59 2020
SHA1 hash: 6C07453FFDDA08B83707C09B82FB3D15F35336B1
Issued to: Symantec Time Stamping Services Signer - G4
Issued by: Symantec Time Stamping Services CA - G2
Expires: Wed Dec 30 02:59:59 2020
SHA1 hash: 65439929B67973EB192D6FF243E6767ADF0834E4
SignTool Error: WinVerifyTrust returned error: 0x800B010A
A certificate chain could not be built to a trusted root authority.
Number of files successfully Verified: 0
Number of warnings: 0
Number of errors: 1
“无法为受信任的根颁发机构构建证书链。”但是为什么呢?
最佳答案
我找到了一篇有关使用 Thawte 证书签署文件的文章: http://codingexpedition.wordpress.com/2011/04/21/thawte-code-signing-pfx/
似乎总是需要/acsigntool选项。因此,我已将 Thawte 证书提取到 .cer 文件中,并使用/ac 参数应用它。
openssl pkcs12 -in company.pfx -out company_ca.pem -nokeys -cacerts
openssl x509 -in company_ca.pem -out company_ca.cer -outform DER
signtool sign /ac company_ca.cer /p password /f company.pfx /t timeserver /v Application.exe
而且效果很好!
关于openssl - "The certificate in the signature cannot be verified"为 Thawte 证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15704629/
我一直在开发数字签名 Node.js 应用程序,然后我遇到了我无法弄清楚的奇怪行为。 首先我生成了公钥/私钥对 described here 然后我实现了以下脚本 const crypto = r
缺少[路由:验证。通知] [URI:{language} / email / verify]所需的参数 使用本地化后,我将laravel电子邮件验证添加到了我的项目中。 但是现在我遇到了问题:Rout
我用对象列表调用方法 performAction 并验证相同的方法。调用此方法后,我修改了一些“对象”。 Mockito 验证失败,说参数不匹配(显示修改的对象),但我可以在 Debug模式下看到对象
我在处理opensl时遇到麻烦,提示无法在具有CA链的地方验证本地颁发的证书。除了本地CA链证书(CER,PEM,CRT)之外,我还有本地颁发的证书(PEM和CRT)。根和颁发者是同一台服务器。比较两
我正在使用 protobuf 自动生成我的 API 服务,在 gRPC 中技术,在我的安卓客户端。自从我一直在毫无问题地工作以来,已经过去了几个月。现在突然之间,AndroidRuntime Veri
我们目前正在使用“mvn clean verify”在 Hudson 上运行我们的持续构建。这就是我们一直在做的,所以我们从不质疑它。 问题是:仅使用“mvn verify”运行连续构建是否安全?因此
我已经在我的虚拟机上安装了 redis。然后我运行命令 [root@vm001jeguan ~]# rladmin help verify 它显示以下错误: [root@dltasvm001jegua
我正在使用以下应用链接:https://developer.android.com/training/app-links/verify-site-associations 使用cmd时:adb she
我写了一个应用程序,我想在网上销售它,所以我把它上传到我的网站,并试图下载并运行它作为测试,但出现了一个窗口,它说:“无法验证发布者。你确定吗?要运行此软件吗?”,并且还说:“发布者:未知发布者”。它
我们正在迁移与Kotlin接触的类,因此我们需要在Java测试类中模拟Kotlin类。我们使用io.mockk:mockk:1.9.3。 为了至少验证x次,我们有一个包装器方法 public stat
在完全更新的 XCode 4.6(以及之前的 4.5)中,构建过程的“验证应用程序”步骤在我的机器上通常需要两分钟以上的时间。在类似计算机上构建相同应用程序的同事只需几秒钟即可完成此步骤。在过去的几个
它在 documentation 中说 构建生命周期中的验证阶段 run any checks on results of integration tests to ensure quality cr
我有一个模拟对象,正在验证一些调用的东西。但想知道 MockedObject.Verify(thingToBeVerified) 的默认参数是什么? 是 Times.Zero、Times.Once 还
谁能向我解释一下每种用户类型(荣誉、已验证、审核和员工之间的区别)他们的角色? (对每个用户及其可以执行的操作的简要说明)。 我查了官方文档,但没有找到! 谢谢。 最佳答案 Honor 用户会自动注册
我正在编写一个 Chrome 扩展,其中内容脚本向后台脚本发送消息。 chrome.runtime.sendMessage({greeting: "hello"}, function(response
我在编写测试时已经习惯了遵循代码模式 public void TestMethod_Condition_Output() { //Arrange---------------- Moc
我有以下代码: class Foo { public Foo() { Size = true; } private bool _size; pr
我有以下代码,取自 ShowSignature来自 PDFBox 2 的示例。我正在运行五个测试,其中调用了它,其中 4 个测试顺利通过(无签名、单签名、双签名、过期签名),但第五个测试是椭圆曲线,但
我正在尝试mockito.verify()功能,该方法仅调用一次,但verify显示调用3次。单元测试只有一个测试,以确保该测试不会受到其他影响。Mockito.verify(utilClass, M
摆弄 Mockito 来实现我的服务的单元测试,但出于某种原因,我无法通过我厚实的头骨来完成它。我的测试通过了,但我不相信我做对了。 这是我测试 count() 方法的示例。该方法只是将调用转发到其存
我是一名优秀的程序员,十分优秀!