SSL for Free 安裝憑證(包含中繼憑證方法) 2017-02-13
https://www.digicert.com/ssl-support/pem-ssl-creation.htm
https://www.digicert.com/ssl-certificate-installation-nginx.htm
SSL For Free:
1. 下載後將private.key轉為pem
cat private.key > _key.pem
=====
2. 下載後將certificate.crt轉為pem
a. cat certificate.crt ca_bundle.crt >> _cert.crt
b. 然後應該開啟的檔案要像這樣
-----BEGIN CERTIFICATE-----
(Your Primary SSL certificate: your_domain_name.crt)
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
(Your Intermediate certificate: CA_bundle.crt)
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
(Your Root certificate: TrustedRoot.crt)
-----END CERTIFICATE-----
c. 最後下這個指令
openssl x509 -in certificate.crt -out _cert.pem -outform PEM
=====
方案B:包含中繼憑證的做法(https://ssorc.tw/6206)
a. 下載Let's encrypt中繼憑證
wget -O - https://letsencrypt.org/certs/lets-encrypt-x1-cross-signed.pem > intermediate.pem
b. 檢查憑證是否可合併
-----BEGIN CERTIFICATE-----
(Your Primary SSL certificate: your_domain_name.crt)
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
(Your Intermediate certificate: DigiCertCA.crt)
-----END CERTIFICATE-----
c. 合併憑證
cat certificate.crt intermediate.pem >> _cert.pem