蒼天家 本家
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
關於我

隨手用部落格

紀錄平時學習用到的東西

考慮想重改版

Github 自學倉庫

我的 Github 帳號

PHP開發

公司: 原生PHP

個人: Slim -> Flight