我刚刚安装了一个新的SSL证书(从StartCom)到我们的服务器之一,并注意到在Chrome中有一个为该网站显示的交叉挂锁图标,所以我开始调查为什么这样。 原来,这是因为发送给浏览器的中间证书使用了旧的SHA-1签名algorithm。
可以肯定的是,我抓取了我们的证书(就像CA原来的证书一样),再次通过OpenSSL运行,将其与SHA-2中间证书(我从CA网站下载)合并,并在IIS上重新更新。 它仍然没有帮助。
我在SSL实验室进行了testing,结果如下:

我不知道的是这里显示的中间证书(指纹“a1ac …”)来自哪里。

它不是我分配给站点的证书的一部分 – 这是certutil -dump cert.pfx的输出:
================ Certificate 0 ================ ================ Begin Nesting Level 1 ================ Serial Number: 1cab36472d9c51 Issuer: CN=StartCom Certification Authority, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL NotBefore: 10/14/2007 10:57 PM NotAfter: 10/14/2022 10:57 PM Subject: CN=StartCom Class 2 Primary Intermediate Server CA, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL Non-root Certificate Template: Cert Hash(sha1): 06 49 69 b7 f4 d6 a7 4f d0 98 be 59 d3 79 fa e4 29 a9 06 fb ---------------- End Nesting Level 1 ---------------- No key provider information Cannot find the certificate and private key for decryption. ================ Certificate 1 ================ ================ Begin Nesting Level 1 ================ Serial Number: 07aa747ba37df3 Issuer: CN=StartCom Class 2 Primary Intermediate Server CA, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL NotBefore: 7/15/2015 3:41 AM NotAfter: 7/15/2017 3:23 AM Subject: [email protected], CN=*.idioma.com, O=IDIOMA, sro, L=Praha, S=Praha, C=CZ Non-root Certificate Template: Cert Hash(sha1): 02 90 be 6e 6e b8 a5 7a ff aa a2 ac 95 b8 61 2a 3d c7 80 f6 ---------------- End Nesting Level 1 ---------------- Key Container = <hidden> Unique container name: <hidden> Provider = Microsoft Enhanced Cryptographic Provider v1.0 Encryption test passed CertUtil: -dump command completed successfully.
请注意,中间证书签名与SSL实验室输出不匹配。 但是,它与我在IIS上打开站点的证书时所看到的一致,转到证书path,打开中间证书并查看其签名。
什么使IIS发送这个特定的中间证书?
更新 :
我的证书的公共部分(我从CA获得的CRT文件)就在这里 。
certutil -verifystore CA "StartCom Class 2 Primary Intermediate Server CA" :
CA "Intermediate Certification Authorities" ================ Certificate 3 ================ Serial Number: 1cab36472d9c51 Issuer: CN=StartCom Certification Authority, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL NotBefore: 10/14/2007 10:57 PM NotAfter: 10/14/2022 10:57 PM Subject: CN=StartCom Class 2 Primary Intermediate Server CA, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL Non-root Certificate Cert Hash(sha1): 06 49 69 b7 f4 d6 a7 4f d0 98 be 59 d3 79 fa e4 29 a9 06 fb No key provider information Cannot find the certificate and private key for decryption. Encryption test passed Verified Issuance Policies: 1.3.6.1.4.1.23223.1.1.1 Verified Application Policies: 1.3.6.1.5.5.7.3.1 Server Authentication 1.3.6.1.5.5.7.3.2 Client Authentication 1.3.6.1.5.5.7.3.4 Secure Email 1.3.6.1.5.5.7.3.3 Code Signing 1.3.6.1.5.5.7.3.8 Time Stamping 1.3.6.1.4.1.311.10.3.4 Encrypting File System 1.3.6.1.5.5.7.3.6 IP security tunnel termination 1.3.6.1.5.5.7.3.7 IP security user Certificate is valid CertUtil: -verifystore command completed successfully.
certutil -GroupPolicy -verifystore CA "StartCom Class 2 Primary Intermediate Server CA" :
CA "Intermediate Certification Authorities" CertUtil: -verifystore command FAILED: 0x80090011 (-2146893807 NTE_NOT_FOUND) CertUtil: Object was not found.
这不是IIS错误。 看起来像是你下载了错误的中间CA证书或者错误地将证书合并到了OpenSSL中。
IIS在内部构build证书链,并使用这些证书(SSL证书不在SSL握手期间传输的根证书除外)发送给客户端。 即使证书未在商店中出现,IIS也可以使用“授权信息访问”证书扩展来检索缺less的颁发者证书。
根据您的输出,中级CA证书(在PFX包中)不是证书的正确颁发者。 如果您可以发送我们(或张贴在这里)您的证书的公共部分,我会提供更多的信息发生了什么事情。 但最有可能的是,问题出在StartCom方面。
编辑17.07.2015
我检查了你的输出结果,发现StartSSL在续签中间CA证书时做出了错误的决定。 他们重新使用了密钥对,因此可以通过不同的中间CA证书和单个根为您的证书生成多个相同的链。 根据许多因素,链可以通过链接引擎来select。
一个好的做法是在CA证书中有任何重要的信息被改变时用新的密钥对更新CA证书。
你应该做什么(如果可能的话):
certutil -urlcache * delete 。 虽然我不能特别评论StartCom,但过去也有类似的问题,从供应商从SHA 1转换到SHA 2,通常是交叉签名证书的问题。
我发现最好的路线是find当前服务器返回的所有中间和根证书,并删除中间和根条目。
在你的情况下,这将是“StartCom 2级主要中间服务器CA”和“StartComauthentication机构”。 您可能首先要将这些导出为安全的一面。
此时,您应该能够从供应商的CA软件包中导入新的证书。