让我们加密在 ssllabs.com 上获得 A+ 级。此服务器的证书链不完整。等级上限为 B。

let's encrypt get grade A+ on ssllabs.com. This server's certificate chain is incomplete. Grade capped to B.

我正在尝试使用 lighttpd 和 acme-tiny 脚本为我的网站获得 A+ 级。下面的步骤:

  1. 创建 Let's Encrypt 帐户私钥:

openssl genrsa 4096 > account.key

  1. 为域(单个域)创建证书签名请求 (CSR)

openssl genrsa 4096 > domain.key

openssl req -new -sha256 -key domain.key -subj "/CN=mysitehere.com" > domain.csr

  1. 制作网站主机挑战文件

mkdir /var/www/.well-known/acme-challenge/

  1. 获取签名证书

python acme_tiny.py --account-key ./account.key --csr ./domain.csr --acme-dir /var/www/.well-known/acme-challenge/ > ./signed.crt

  1. 正在安装证书

wget -O - https://letsencrypt.org/certs/lets-encrypt-x1-cross-signed.pem > intermediate.pem

cat signed.crt intermediate.pem > chained.pem

cat domain.key chained.pem > mysitehere.pem

lighttpd-启用-mod ssl

/etc/lighttpd/conf-enabled/10-ssl.conf

$SERVER["socket"] == "0.0.0.0:443" {
ssl.engine  = "enable"
ssl.pemfile = "/root/letsencrypt/mysitehere.pem"
ssl-ca-file = "/root/letsencrypt/chained.pem"
    ssl.dh-file = "/root/letsencrypt/dhparams/dhparams.pem"
    ssl.cipher-list = "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA "
ssl.honor-cipher-order = "enable"}

一切似乎都很好。 https 工作。

在 ssllabs 上测试此设置并获得 B 级。

Certificate - 100%

Protocol support - 100%

Key exchange - 90%

Cipher Strength - 90%

This server's certificate chain is incomplete. Chain issues Incomplete

提供的证书 1(1532 字节)

由服务器发送 mysitehere.com 指纹 SHA1: e0f6d98733915 ......

额外下载Let's Encrypt Authority X1 ......

在信任库中 DST 根 CA X3 自签名

如何制作文件 mysitehere.pem 避免从 let's encrypt 站点额外下载并从 ssllabs 获得 A 级的正确方法?

谢谢!

ssl-ca-file 应该是 ssl.ca-file.