Let's Encrypt 签发 ECC 证书
Aug 9, 2016
ECC,Elliptic Curve Cryptography,或者你也可以叫 ECDSA 证书,他的算法比 RSA 更快且更加安全,唯一的问题是兼容性,部分老旧浏览器不支持.
不过看我的网站的人也不多,那就换.
首先我们生成 CSR.
openssl ecparam -genkey -name secp384r1 | openssl ec -out domain.key
openssl req -new -sha256 -key domain.key -out domain.csr
注意 Common Name 必须为你的域名,必须完全一致,例如 www.example.com
.
那如果有多个域名呢?那就生产包括所有域名的 CSR.
要加入多个域名,首先在 openssl.cnf 里面添加如下设定.
[ v3_req ]
subjectAltName = @alt_names
[alt_names]
DNS.1 = server1.example.com
DNS.2 = mail.example.com
DNS.3 = www.example.com
DNS.4 = www.sub.example.com
DNS.5 = mx.example.com
DNS.6 = support.example.com
然后生成即可.
有了 CSR 我们让 Let’s Encrypt 签就可以了.
letsencrypt certonly \
--authenticator manual \
--server https://acme-v01.api.letsencrypt.org/directory --text \
--email webmaster@example.com \
--csr domain.csr
然后按照他的提示开个 HTTP 服务器验证即可.
mkdir -p /tmp/certbot/public_html/.well-known/acme-challenge
cd /tmp/certbot/public_html
printf "%s" 'some codes' > .well-known/acme-challenge/UbrMyhohkxIx_DfRQ9ryhdIQVTLrqk4Jkf87A8J4VCs
$(command -v python2 || command -v python2.7 || command -v python2.6) -c \
"import BaseHTTPServer, SimpleHTTPServer; \
s = BaseHTTPServer.HTTPServer(('', 80), SimpleHTTPServer.SimpleHTTPRequestHandler); \
s.serve_forever()"
然后回车,Volia!
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.