差異處
這裏顯示兩個版本的差異處。
兩邊的前次修訂版 前次修改 下次修改 | 前次修改 | ||
tech:pki:gcassl [2008/08/21 07:28] – jonathan | tech:pki:gcassl [2009/06/17 10:55] (目前版本) – jonathan | ||
---|---|---|---|
行 1: | 行 1: | ||
+ | ====== 申請 GCA SSL Apache 設備憑證 ====== | ||
+ | 本文是依據 GCA 官方網站((http:// | ||
+ | ===== GCA SSL 主機憑證申請流程圖 ===== | ||
+ | http:// | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ===== 產生 CSR 憑證請求檔程序 ===== | ||
+ | * 登入有安裝 openssl 之 Linux 主機 | ||
+ | * 產生密碼檔 server.key | ||
+ | < | ||
+ | openssl genrsa -des3 -out server.key 1024 | ||
+ | 設定密碼 | ||
+ | </ | ||
+ | * 產生 5 年效期的憑證需求檔 server.csr | ||
+ | < | ||
+ | openssl req -new -days 1825 -key server.key -out server.csr | ||
+ | </ | ||
+ | * 以經濟部 ED 系統為例, | ||
+ | < | ||
+ | Country Name (2 letter code) [GB]:TW | ||
+ | State or Province Name (full name) [Berkshire]: | ||
+ | Locality Name (eg, city) [Newbury]: | ||
+ | Organization Name (eg, company) [My Company Ltd]: | ||
+ | Organizational Unit Name (eg, section) []: | ||
+ | Common Name (eg, your name or your server' | ||
+ | Email Address []: | ||
+ | |||
+ | Please enter the following ' | ||
+ | to be sent with your certificate request | ||
+ | A challenge password []: | ||
+ | An optional company name []: | ||
+ | </ | ||
+ | |||
+ | ===== 上 GCA 網站申請 SSL 憑證程序 ===== | ||
+ | 參考文件 http:// | ||
+ | |||
+ | ===== 安裝 apache 安裝 SSL 憑證程序 ==== | ||
+ | 參考文件 http:// | ||
+ | |||
+ | ==== 1. 取得 GRCA 自簽憑證及 GCA 憑證之憑證串鏈 ==== | ||
+ | * 一套 Apache 只需安裝一次就可以 | ||
+ | * 在 Windows IE 下安裝 GRCA ((http:// | ||
+ | * 將 TW Government Root Certification Authority 憑證匯出為 GRCA_GCA.p7b | ||
+ | ==== 2. 完成 GRCA 自簽憑證及 GCA 憑證之憑證串鏈 ==== | ||
+ | * 將 GRCA_GCA.p7b 複製到 apache 的主機內 | ||
+ | * 將憑證串連擋由 DER 編碼格式轉成 PEM 編碼格式((Base64 編碼格式)) | ||
+ | < | ||
+ | openssl pkcs7 -in GRCA_GCA.p7b -inform DER -print_certs -out GRCA_GCA.pem | ||
+ | </ | ||
+ | * 將 PEM 檔複製成 Apache+mod_ssl 的 SSLCertificateChainFile | ||
+ | < | ||
+ | cp GRCA_GCA.pem / | ||
+ | </ | ||
+ | * 修改 ssl.conf 定義檔 ((vi / | ||
+ | < | ||
+ | : | ||
+ | SSLCertificateChainFile / | ||
+ | : | ||
+ | </ | ||
+ | ==== 3. 安裝 SSL 伺服器軟體憑證 ==== | ||
+ | * 將簽發下來的 SSL 伺服器軟體憑證(server.cer)與密碼檔(server.key)複製到 apache 的主機內 | ||
+ | * 將憑證擋由 DER 編碼格式轉成 PEM 編碼格式((Base64 編碼格式)) | ||
+ | * 將密碼檔加入 PIN 碼存成 PEM 編碼格式 | ||
+ | < | ||
+ | openssl x509 -in server.cer -inform DER -out server.pem | ||
+ | openssl rsa -in server.key -out mycert.pem | ||
+ | </ | ||
+ | * 將 PEM 檔複製成 Apache+mod_ssl 的 SSLCertificateFile | ||
+ | < | ||
+ | cp server.pem / | ||
+ | cp mycert.pem / | ||
+ | </ | ||
+ | * 修改 ssl.conf 定義檔 ((vi / | ||
+ | < | ||
+ | : | ||
+ | SSLCertificateFile / | ||
+ | : | ||
+ | SSLCertificateKeyFile / | ||
+ | : | ||
+ | </ | ||
+ | |||
+ | ==== 4. 散佈 GRCA 自簽憑證到用戶端 ==== | ||
+ | * 用戶端 IE 如果沒有安裝 GRCA 就會出現伺服器憑證為不被信任的警告訊息 | ||
+ | * 安裝 GRCA 有以下兩種方式 | ||
+ | - 由使用者到政府憑證總管理中心下載安裝 ((http:// | ||
+ | - 更改程式首頁, | ||
+ | < | ||
+ | <OBJECT data=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | {{tag> |