dew*_*ydb 2 ssl nginx ssl-certificate
从我可以看出,我可以在任何oder中堆叠"添加信任"证书,当我将它们放在我的domain.crt文件中,然后再在服务器上安装它.我想大多数浏览器都可以解析这些文件并找出链的正确顺序.但就性能而言,堆叠它们的正确方法是什么,这会导致浏览器花费更少的时间来分析证书?
例如,我刚安装的证书有以下需要合并的文件.
domain_com.crt
COMODORSADomainValidationSecureServerCA.crt
COMODORSAAddTrustCA.crt
AddTrustExternalCARoot.crt
Run Code Online (Sandbox Code Playgroud)
这是将它们连接到文件的最佳顺序,假设第一个文件名的内容显示在文件的顶部?
这不仅仅是性能问题,而是符合TLS规范的问题.
我想大多数浏览器都可以解析这些文件并找出链的正确顺序.
有些浏览器可能是宽容的,但TLS规范明确规定您必须以正确的顺序呈现证书链:
Run Code Online (Sandbox Code Playgroud)certificate_list This is a sequence (chain) of certificates. The sender's certificate MUST come first in the list. Each following certificate MUST directly certify the one preceding it. Because certificate validation requires that root keys be distributed independently, the self-signed certificate that specifies the root certificate authority MAY be omitted from the chain, under the assumption that the remote end must already possess it in order to validate it in any case.
我想一些服务器可以在发送证书链之前读取其配置时以正确的顺序重新安排证书链(在这种情况下可能仍存在性能问题),但情况并非总是如此.
我没有尝试用错误的顺序配置Nginx链,但我知道Apache Httpd将完全按配置发送链(如果配置错误,则错误顺序).有疑问,我建议您按照正确的顺序配置您的服务器链,以确保它符合TLS规范.