【问题标题】:Missing intermediate ssl chain fail in my nginx configuration在我的 nginx 配置中缺少中间 ssl 链失败
【发布时间】:2023-03-07 17:17:01
【问题描述】:

我的配置文件中有以下内容:

## verify chain of trust of OCSP response using Root CA and Intermediate certs
ssl_trusted_certificate /path/to/intermediate_ca;

我的证书正在向浏览器发出 unsecure 警告,我认为这可能只是因为我缺少将中间链呈现给服务器的文件。即便如此,我正在使用 comodo positivessl,但在 ssls.com 和 google 上 无休止地 搜索该文件后却找不到该文件。有人知道我应该怎么做吗?我的服务器中的 cipherscan 发出“证书:不受信任”和“OCSP 装订:不支持”,尽管我打开了 ssl_stapling; ssl_stapling_verify on; 在文件上。

【问题讨论】:

    标签: ssl nginx ssl-certificate


    【解决方案1】:

    您可以下载 Comodo 中间证书from this page。根据颁发证书的时间,您应该下载 SHA2 或 SHA1。

    请务必滚动列表并下载与表中 PositiveSSL 行关联的文件。

    下载后,将所有文件合并到一个 .pem 文件中: - 服务器证书(然后是您收到的证书) - 从最具体到最通用的中间体

    将文件存储在服务器上并使用以下设置正确配置 Nginx:

    ssl    on;
    ssl_certificate    /path/to/bundle.pem;
    ssl_certificate_key    /path/to/private-key.key;
    

    【讨论】:

    • "Once downloaded, combine all the files in a single .pem file: - the server certificate (then one you received) - the intermediates, from the most specific to the most generic" 究竟如何?我可以选择下载这些comodo-rsa-domain-validation-sha-2-intermediates.ca-bundle (4.07 KB) comodo-rsa-domain-validation-sha-2-w-root.ca-bundle (5.58 KB) comodorsaaddtrustca.crt (1.91 KB) addtrustexternalcaroot.crt (1.49 KB) comodorsadomainvalidationsecureserverca.crt (2.13 KB)
    • 它们是文本文件,因此您可以将它们与cat 或任何文本编辑器(文本编辑器,不是Word 或类似编辑器)结合起来。
    • 这个命令到底是什么?很抱歉,您的指示不够详细,我有点迷路了......
    • @Fane 我写了说明。创建一个新的文本文件作为您的证书包(**使用文本编辑器,不要使用 word),使用相同的编辑器打开中间证书文件并将内容复制到您创建的新文件中。
    • Simone 你介意更具体一点吗?我应该下载所有这五个文件吗?然后我该怎么办?创建 new_file.pem 并将这五个文件的内容复制粘贴到 new_file.pem 中? cat 呢?我应该做类似cat file_to_copy new_file.pem 的事情吗?
    猜你喜欢
    • 2021-10-05
    • 2019-07-03
    • 2016-05-12
    • 1970-01-01
    • 1970-01-01
    • 2020-05-06
    • 2023-03-07
    • 2015-02-17
    • 1970-01-01
    相关资源
    最近更新 更多